Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions benches/lai/no_op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,26 @@ fn no_op_x1() -> Result<(), Box<dyn std::error::Error>> {
}

fn no_op_x32() -> Result<(), Box<dyn std::error::Error>> {
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<dyn std::error::Error>> {
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<dyn std::error::Error>> {
let mut opts = Options::default();
opts.concurrency = 256;
let opts = Options {
concurrency: 256,
..Options::default()
};
run_no_ops(black_box(opts))
}

Expand Down
2 changes: 1 addition & 1 deletion src/io/noop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
})
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),* $(,)* ) ) => {{
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {});
}
}
3 changes: 2 additions & 1 deletion tests/fs_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down