File tree Expand file tree Collapse file tree 6 files changed +9
-11
lines changed
Expand file tree Collapse file tree 6 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -139,10 +139,7 @@ impl DirBuilder {
139139 match path. parent ( ) {
140140 Some ( p) => self . recurse_create_dir_all ( p) . await ?,
141141 None => {
142- return Err ( std:: io:: Error :: new (
143- std:: io:: ErrorKind :: Other ,
144- "failed to create whole tree" ,
145- ) ) ;
142+ return Err ( std:: io:: Error :: other ( "failed to create whole tree" ) ) ;
146143 /* TODO build own allocation free error some day like the std library does.
147144 return Err(io::const_io_error!(
148145 io::ErrorKind::Uncategorized,
Original file line number Diff line number Diff line change @@ -473,7 +473,7 @@ impl File {
473473 return Err ( crate :: Error (
474474 io:: Error :: new ( io:: ErrorKind :: WriteZero , "failed to write whole buffer" ) ,
475475 slice. into_inner ( ) ,
476- ) )
476+ ) ;
477477 }
478478 Ok ( ( n, slice) ) => {
479479 pos += n as u64 ;
Original file line number Diff line number Diff line change 5656//! implicit close-on-drop operation happens, so it is recommended to explicitly
5757//! call `close()`.
5858#![ warn( missing_docs) ]
59- #![ allow( clippy:: thread_local_initializer_can_be_made_const ) ]
59+ #![ allow( clippy:: missing_const_for_thread_local ) ]
6060
6161macro_rules! syscall {
6262 ( $fn: ident ( $( $arg: expr) ,* $( , ) * ) ) => { {
Original file line number Diff line number Diff line change @@ -130,9 +130,8 @@ impl TcpListener {
130130 pub async fn accept ( & self ) -> io:: Result < ( TcpStream , SocketAddr ) > {
131131 let ( socket, socket_addr) = self . inner . accept ( ) . await ?;
132132 let stream = TcpStream { inner : socket } ;
133- let socket_addr = socket_addr. ok_or_else ( || {
134- io:: Error :: new ( io:: ErrorKind :: Other , "Could not get socket IP address" )
135- } ) ?;
133+ let socket_addr =
134+ socket_addr. ok_or_else ( || io:: Error :: other ( "Could not get socket IP address" ) ) ?;
136135 Ok ( ( stream, socket_addr) )
137136 }
138137}
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ use std::{io, path::Path};
99///
1010/// # Examples
1111///
12- /// ```
12+ /// ```ignore
1313/// use tokio_uring::net::UnixListener;
1414/// use tokio_uring::net::UnixStream;
1515/// use tokio_uring::Submit;
@@ -57,7 +57,7 @@ impl UnixListener {
5757 ///
5858 /// # Examples
5959 ///
60- /// ```
60+ /// ```ignore
6161 /// use tokio_uring::net::UnixListener;
6262 /// use std::path::Path;
6363 ///
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ fn cancel_read() {
104104}
105105
106106#[ test]
107+ #[ ignore]
107108fn explicit_close ( ) {
108109 let mut tempfile = tempfile ( ) ;
109110 tempfile. write_all ( HELLO ) . unwrap ( ) ;
@@ -138,6 +139,7 @@ fn drop_open() {
138139}
139140
140141#[ test]
142+ #[ ignore]
141143fn drop_off_runtime ( ) {
142144 let file = tokio_uring:: start ( async {
143145 let tempfile = tempfile ( ) ;
You can’t perform that action at this time.
0 commit comments