2
2
mod impl_ {
3
3
use polling:: { Event , Poller } ;
4
4
use std:: io:: Result ;
5
- use std:: os:: windows:: io:: { AsRawSocket , RawSocket } ;
5
+ use std:: os:: windows:: io:: RawSocket ;
6
6
7
7
/// The raw registration into the reactor.
8
8
#[ derive( Debug ) ]
@@ -16,7 +16,7 @@ mod impl_ {
16
16
fn from ( raw : RawSocket ) -> Self {
17
17
Self { raw }
18
18
}
19
- }
19
+ }
20
20
21
21
impl Registration {
22
22
/// Registers the object into the reactor.
@@ -53,7 +53,7 @@ mod impl_ {
53
53
use polling:: { Event , PollMode , Poller } ;
54
54
55
55
use std:: io:: Result ;
56
- use std:: os:: unix:: io:: { AsRawFd , RawFd } ;
56
+ use std:: os:: unix:: io:: RawFd ;
57
57
use std:: process:: Child ;
58
58
59
59
/// The raw registration into the reactor.
@@ -76,16 +76,7 @@ mod impl_ {
76
76
fn from ( raw : RawFd ) -> Self {
77
77
Self :: Fd ( raw)
78
78
}
79
- }
80
-
81
- impl AsRawFd for Registration {
82
- fn as_raw_fd ( & self ) -> RawFd {
83
- match self {
84
- Self :: Fd ( raw) => * raw,
85
- _ => panic ! ( "not a file descriptor" ) ,
86
- }
87
- }
88
- }
79
+ }
89
80
90
81
impl From < Signal > for Registration {
91
82
fn from ( signal : Signal ) -> Self {
@@ -157,7 +148,7 @@ mod impl_ {
157
148
mod impl_ {
158
149
use polling:: { Event , Poller } ;
159
150
use std:: io:: Result ;
160
- use std:: os:: unix:: io:: { AsRawFd , RawFd } ;
151
+ use std:: os:: unix:: io:: RawFd ;
161
152
162
153
/// The raw registration into the reactor.
163
154
#[ derive( Debug ) ]
@@ -173,12 +164,6 @@ mod impl_ {
173
164
}
174
165
}
175
166
176
- impl AsRawFd for Registration {
177
- fn as_raw_fd ( & self ) -> RawFd {
178
- self . raw
179
- }
180
- }
181
-
182
167
impl Registration {
183
168
/// Registers the object into the reactor.
184
169
pub ( crate ) fn add ( & self , poller : & Poller , token : usize ) -> Result < ( ) > {
0 commit comments