Skip to content

Commit

Permalink
Fix compilation for the port example.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Jan 29, 2025
1 parent b14012a commit 9020ea3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/event/port.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
//! # Examples
//!
//! ```
//! # fn test() -> io::Result<()> {
//! # fn test() -> std::io::Result<()> {
//! use rustix::event::port;
//! use rustix::stdio::stdout;
//! use std::io;
//! use std::ptr::without_provenance_mut;
//!
//! let some_fd = stdout();
//! let some_userdata = without_provenance_mut(7);
//! let some_userdata = 7 as *mut _;
//!
//! // Create a port.
//! let port = port::create()?;
Expand All @@ -21,7 +20,7 @@
//! }
//!
//! // Get a single event.
//! let event = port::get(&port, None);
//! let event = port::get(&port, None)?;
//!
//! assert_eq!(event.userdata(), some_userdata);
//! # Ok(())
Expand Down

0 comments on commit 9020ea3

Please sign in to comment.