-
Notifications
You must be signed in to change notification settings - Fork 661
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Take BorrowedFd as the argument for PollFd::new
&AsFd didn't work because there are 'static types, like std::fs::File, which implement AsFd. The created BorrowedFd type within the PollFd::new method would have a very brief lifetime, but the PhantomData would capture the lifetime of the std::fs::File. Taking BorrowFd<'fd> argument makes the lifetime explicit.
- Loading branch information
Showing
3 changed files
with
17 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters