File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ pub struct SmolSocket(Async<Socket>);
2020impl FromRawFd for SmolSocket {
2121 unsafe fn from_raw_fd ( fd : RawFd ) -> Self {
2222 let socket = Socket :: from_raw_fd ( fd) ;
23- socket. set_non_blocking ( true ) . unwrap ( ) ;
23+ socket. set_nonblocking ( true ) . unwrap ( ) ;
2424 SmolSocket ( Async :: new ( socket) . unwrap ( ) )
2525 }
2626}
Original file line number Diff line number Diff line change @@ -137,10 +137,10 @@ impl Socket {
137137 // when building with --features smol we don't need this
138138 #[ allow( dead_code) ]
139139 /// Make this socket non-blocking
140- pub fn set_non_blocking ( & self , non_blocking : bool ) -> Result < ( ) > {
141- let mut non_blocking = non_blocking as libc:: c_int ;
140+ pub fn set_nonblocking ( & self , nonblocking : bool ) -> Result < ( ) > {
141+ let mut nonblocking = nonblocking as libc:: c_int ;
142142 let res = unsafe {
143- libc:: ioctl ( self . as_raw_fd ( ) , libc:: FIONBIO , & mut non_blocking )
143+ libc:: ioctl ( self . as_raw_fd ( ) , libc:: FIONBIO , & mut nonblocking )
144144 } ;
145145 if res < 0 {
146146 return Err ( Error :: last_os_error ( ) ) ;
@@ -689,10 +689,10 @@ mod test {
689689 }
690690
691691 #[ test]
692- fn set_non_blocking ( ) {
692+ fn set_nonblocking ( ) {
693693 let sock = Socket :: new ( NETLINK_ROUTE ) . unwrap ( ) ;
694- sock. set_non_blocking ( true ) . unwrap ( ) ;
695- sock. set_non_blocking ( false ) . unwrap ( ) ;
694+ sock. set_nonblocking ( true ) . unwrap ( ) ;
695+ sock. set_nonblocking ( false ) . unwrap ( ) ;
696696 }
697697
698698 #[ test]
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ pub struct TokioSocket(AsyncFd<Socket>);
1818impl FromRawFd for TokioSocket {
1919 unsafe fn from_raw_fd ( fd : RawFd ) -> Self {
2020 let socket = Socket :: from_raw_fd ( fd) ;
21- socket. set_non_blocking ( true ) . unwrap ( ) ;
21+ socket. set_nonblocking ( true ) . unwrap ( ) ;
2222 TokioSocket ( AsyncFd :: new ( socket) . unwrap ( ) )
2323 }
2424}
@@ -41,7 +41,7 @@ impl AsyncSocket for TokioSocket {
4141
4242 fn new ( protocol : isize ) -> io:: Result < Self > {
4343 let socket = Socket :: new ( protocol) ?;
44- socket. set_non_blocking ( true ) ?;
44+ socket. set_nonblocking ( true ) ?;
4545 Ok ( Self ( AsyncFd :: new ( socket) ?) )
4646 }
4747
You can’t perform that action at this time.
0 commit comments