diff --git a/benches/executor.rs b/benches/executor.rs index 74b2955..42fedbd 100644 --- a/benches/executor.rs +++ b/benches/executor.rs @@ -59,7 +59,7 @@ fn running_benches(c: &mut Criterion) { for (group_name, multithread) in [("single_thread", false), ("multi_thread", true)].iter() { let mut group = c.benchmark_group(group_name.to_string()); - group.bench_function(format!("{}::spawn_one", prefix), |b| { + group.bench_function(format!("{prefix}::spawn_one"), |b| { if with_static { run_static( || { @@ -98,7 +98,7 @@ fn running_benches(c: &mut Criterion) { }); } - group.bench_function(format!("{}::spawn_many_local", prefix), |b| { + group.bench_function(format!("{prefix}::spawn_many_local"), |b| { if with_static { run_static( || { @@ -136,7 +136,7 @@ fn running_benches(c: &mut Criterion) { } }); - group.bench_function(format!("{}::spawn_recursively", prefix), |b| { + group.bench_function(format!("{prefix}::spawn_recursively"), |b| { #[allow(clippy::manual_async_fn)] fn go(i: usize) -> impl Future + Send + 'static { async move { @@ -201,7 +201,7 @@ fn running_benches(c: &mut Criterion) { } }); - group.bench_function(format!("{}::yield_now", prefix), |b| { + group.bench_function(format!("{prefix}::yield_now"), |b| { if with_static { run_static( || { @@ -247,7 +247,7 @@ fn running_benches(c: &mut Criterion) { } }); - group.bench_function(format!("{}::channels", prefix), |b| { + group.bench_function(format!("{prefix}::channels"), |b| { if with_static { run_static( || { @@ -325,7 +325,7 @@ fn running_benches(c: &mut Criterion) { } }); - group.bench_function(format!("{}::web_server", prefix), |b| { + group.bench_function(format!("{prefix}::web_server"), |b| { if with_static { run_static( || { diff --git a/examples/priority.rs b/examples/priority.rs index 60d5c9a..b1dc01e 100644 --- a/examples/priority.rs +++ b/examples/priority.rs @@ -72,9 +72,9 @@ fn main() { // Spawn a task with this priority. tasks.push(EX.spawn(priority, async move { - println!("{:?}", priority); + println!("{priority:?}"); future::yield_now().await; - println!("{:?}", priority); + println!("{priority:?}"); })); } diff --git a/src/lib.rs b/src/lib.rs index baeda1d..74e02db 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,6 +38,7 @@ html_logo_url = "https://raw.githubusercontent.com/smol-rs/smol/master/assets/images/logo_fullsize_transparent.png" )] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] +#![allow(clippy::unused_unit)] // false positive fixed in Rust 1.89 use std::fmt; use std::marker::PhantomData;