Skip to content

Commit

Permalink
Fix another issue in doctests
Browse files Browse the repository at this point in the history
Signed-off-by: John Nunley <dev@notgull.net>
  • Loading branch information
notgull committed Aug 10, 2023
1 parent f5a23ca commit 8708878
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/os/iocp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub trait PollerIocpExt: PollerSealed {
/// # Examples
///
/// ```rust
/// use polling::{Poller, Event};
/// use polling::{Poller, Event, Events};
/// use polling::os::iocp::{CompletionPacket, PollerIocpExt};
///
/// use std::thread;
Expand All @@ -39,7 +39,7 @@ pub trait PollerIocpExt: PollerSealed {
/// });
///
/// // Wait for the event.
/// let mut events = vec![];
/// let mut events = Events::new();
/// poller.wait(&mut events, None)?;
///
/// assert_eq!(events.len(), 1);
Expand Down Expand Up @@ -96,7 +96,7 @@ pub trait PollerIocpExt: PollerSealed {
/// poller.wait(&mut events, None).unwrap();
///
/// assert_eq!(events.len(), 1);
/// assert_eq!(events[0], Event::all(0));
/// assert_eq!(events.iter().next().unwrap(), Event::all(0));
/// ```
unsafe fn add_waitable(
&self,
Expand Down Expand Up @@ -139,7 +139,7 @@ pub trait PollerIocpExt: PollerSealed {
/// poller.wait(&mut events, None).unwrap();
///
/// assert_eq!(events.len(), 1);
/// assert_eq!(events[0], Event::all(0));
/// assert_eq!(events.iter().next().unwrap(), Event::all(0));
///
/// // Modify the waitable handle.
/// poller.modify_waitable(&child, Event::readable(0), PollMode::Oneshot).unwrap();
Expand Down Expand Up @@ -185,7 +185,7 @@ pub trait PollerIocpExt: PollerSealed {
/// poller.wait(&mut events, None).unwrap();
///
/// assert_eq!(events.len(), 1);
/// assert_eq!(events[0], Event::all(0));
/// assert_eq!(events.iter().next().unwrap(), Event::all(0));
///
/// // Remove the waitable handle.
/// poller.remove_waitable(&child).unwrap();
Expand Down

0 comments on commit 8708878

Please sign in to comment.