Skip to content

Commit 603d4dc

Browse files
committed
Update to newest master
Signed-off-by: John Nunley <[email protected]>
1 parent 25b828f commit 603d4dc

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/os/windows.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ impl<T: AsHandle> Waitable<T> {
6969
/// ```
7070
pub fn new(handle: T) -> Result<Self> {
7171
Ok(Self(Async {
72-
source: Reactor::get().insert_io(unsafe { Registration::new_waitable(&handle) })?,
72+
source: Reactor::get()
73+
.insert_io(unsafe { Registration::new_waitable(handle.as_handle()) })?,
7374
io: Some(handle),
7475
}))
7576
}

src/reactor/windows.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ use polling::{Event, PollMode, Poller};
55
use std::fmt;
66
use std::io::Result;
77
use std::os::windows::io::{
8-
AsHandle, AsRawHandle, AsRawSocket, AsSocket, BorrowedHandle, BorrowedSocket, RawHandle,
9-
RawSocket,
8+
AsRawHandle, AsRawSocket, BorrowedHandle, BorrowedSocket, RawHandle, RawSocket,
109
};
1110

1211
/// The raw registration into the reactor.
@@ -47,17 +46,17 @@ impl Registration {
4746
/// # Safety
4847
///
4948
/// The provided file descriptor must be valid and not be closed while this object is alive.
50-
pub(crate) unsafe fn new(f: impl AsSocket) -> Self {
51-
Self::Socket(f.as_socket().as_raw_socket())
49+
pub(crate) unsafe fn new(f: BorrowedSocket<'_>) -> Self {
50+
Self::Socket(f.as_raw_socket())
5251
}
5352

5453
/// Create a new [`Registration`] around a waitable handle.
5554
///
5655
/// # Safety
5756
///
5857
/// The provided handle must be valid and not be closed while this object is alive.
59-
pub(crate) unsafe fn new_waitable(f: impl AsHandle) -> Self {
60-
Self::Handle(f.as_handle().as_raw_handle())
58+
pub(crate) unsafe fn new_waitable(f: BorrowedHandle<'_>) -> Self {
59+
Self::Handle(f.as_raw_handle())
6160
}
6261

6362
/// Registers the object into the reactor.

0 commit comments

Comments
 (0)