@@ -78,9 +78,7 @@ impl<T: std::fmt::Debug> std::fmt::Debug for AsyncFd<T> {
78
78
}
79
79
}
80
80
81
- const fn all_interest ( ) -> mio:: Interest {
82
- mio:: Interest :: READABLE . add ( mio:: Interest :: WRITABLE )
83
- }
81
+ const ALL_INTEREST : mio:: Interest = mio:: Interest :: READABLE . add ( mio:: Interest :: WRITABLE ) ;
84
82
85
83
/// Represents an IO-ready event detected on a particular file descriptor, which
86
84
/// has not yet been acknowledged. This is a `must_use` structure to help ensure
@@ -93,7 +91,7 @@ pub struct ReadyGuard<'a, T> {
93
91
94
92
impl < ' a , T : std:: fmt:: Debug > std:: fmt:: Debug for ReadyGuard < ' a , T > {
95
93
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
96
- f. debug_struct ( "ClearReady " )
94
+ f. debug_struct ( "ReadyGuard " )
97
95
. field ( "async_fd" , self . async_fd )
98
96
. finish ( )
99
97
}
@@ -218,7 +216,7 @@ impl<T> AsyncFd<T> {
218
216
219
217
pub ( crate ) fn new_with_handle ( inner : T , fd : RawFd , handle : Handle ) -> io:: Result < Self > {
220
218
let shared = if let Some ( inner) = handle. inner ( ) {
221
- inner. add_source ( & mut SourceFd ( & fd) , all_interest ( ) ) ?
219
+ inner. add_source ( & mut SourceFd ( & fd) , ALL_INTEREST ) ?
222
220
} else {
223
221
return Err ( io:: Error :: new (
224
222
io:: ErrorKind :: Other ,
0 commit comments