You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Relax lifetime requirements for PollFd::new (#2134)
* Relax lifetime requirements for PollFd::new
Fixes#2118
* 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.
* fix legacy comment
---------
Co-authored-by: Steve Lau <[email protected]>
0 commit comments