Skip to content

Commit

Permalink
Fix doctest and nitpick
Browse files Browse the repository at this point in the history
Signed-off-by: John Nunley <[email protected]>
  • Loading branch information
notgull committed Oct 18, 2023
1 parent ac3978e commit 5c11241
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -658,10 +658,10 @@ pin_project_lite::pin_project! {
/// another active listener. Whether one *additional* listener will be notified depends on what
/// kind of notification was delivered.
///
/// The listener is not registered into the linked list inside of the [`Event`] by default. It
/// needs to be pinned first before being inserted using the `listen()` method. After the
/// listener has begun `listen`ing, the user can `await` it like a future or call `wait()`
/// to block the current thread until it is notified.
/// The listener is not registered into the linked list inside of the [`Event`] by default if
/// it is created via the `new()` method. It needs to be pinned first before being inserted
/// using the `listen()` method. After the listener has begun `listen`ing, the user can
/// `await` it like a future or call `wait()` to block the current thread until it is notified.
///
/// ## Examples
///
Expand All @@ -675,10 +675,11 @@ pin_project_lite::pin_project! {
/// let flag = Arc::new(AtomicBool::new(false));
///
/// // Create an event to wait on.
/// let event = Event::new();
/// let event = Arc::new(Event::new());
///
/// thread::spawn({
/// let flag = flag.clone();
/// let event = event.clone();
/// move || {
/// thread::sleep(Duration::from_secs(2));
/// flag.store(true, Ordering::SeqCst);
Expand Down

0 comments on commit 5c11241

Please sign in to comment.