diff --git a/benches/lai/no_op.rs b/benches/lai/no_op.rs index 9a4b4b3e..fbe92a7b 100644 --- a/benches/lai/no_op.rs +++ b/benches/lai/no_op.rs @@ -60,20 +60,26 @@ fn no_op_x1() -> Result<(), Box> { } fn no_op_x32() -> Result<(), Box> { - let mut opts = Options::default(); - opts.concurrency = 32; + let opts = Options { + concurrency: 32, + ..Options::default() + }; run_no_ops(black_box(opts)) } fn no_op_x64() -> Result<(), Box> { - let mut opts = Options::default(); - opts.concurrency = 64; + let opts = Options { + concurrency: 64, + ..Options::default() + }; run_no_ops(black_box(opts)) } fn no_op_x256() -> Result<(), Box> { - let mut opts = Options::default(); - opts.concurrency = 256; + let opts = Options { + concurrency: 256, + ..Options::default() + }; run_no_ops(black_box(opts)) } diff --git a/src/io/noop.rs b/src/io/noop.rs index 8ad28e7e..95d7664b 100644 --- a/src/io/noop.rs +++ b/src/io/noop.rs @@ -32,7 +32,7 @@ mod test { use crate as tokio_uring; #[test] - fn perform_no_op() -> () { + fn perform_no_op() { tokio_uring::start(async { tokio_uring::no_op().await.unwrap(); }) diff --git a/src/lib.rs b/src/lib.rs index 819eebf7..aca43dd4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -57,7 +57,7 @@ //! call `close()`. #![warn(missing_docs)] -#![allow(clippy::thread_local_initializer_can_be_made_const)] +#![allow(clippy::missing_const_for_thread_local)] macro_rules! syscall { ($fn: ident ( $($arg: expr),* $(,)* ) ) => {{ diff --git a/src/runtime/mod.rs b/src/runtime/mod.rs index 369c060b..c4df2d0f 100644 --- a/src/runtime/mod.rs +++ b/src/runtime/mod.rs @@ -177,13 +177,13 @@ mod test { #[test] fn block_on() { let rt = Runtime::new(&builder()).unwrap(); - rt.block_on(async move { () }); + rt.block_on(async move {}); } #[test] fn block_on_twice() { let rt = Runtime::new(&builder()).unwrap(); - rt.block_on(async move { () }); - rt.block_on(async move { () }); + rt.block_on(async move {}); + rt.block_on(async move {}); } } diff --git a/tests/fs_file.rs b/tests/fs_file.rs index 096565e6..66f79294 100644 --- a/tests/fs_file.rs +++ b/tests/fs_file.rs @@ -148,7 +148,8 @@ fn explicit_close() { fn drop_open() { tokio_uring::start(async { let tempfile = tempfile(); - let _ = File::create(tempfile.path()); + // Explicitly not awaiting the future + _ = File::create(tempfile.path()); // Do something else let file = File::create(tempfile.path()).await.unwrap();