mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-09 00:00:08 +02:00
tokio: simplify Option handling with idiomatic combinators (#8336)
This commit is contained in:
@@ -84,9 +84,7 @@ fn remote_spawn_contention(c: &mut Criterion) {
|
||||
}
|
||||
|
||||
fn parallelism_levels() -> Vec<usize> {
|
||||
let max_parallelism = std::thread::available_parallelism()
|
||||
.map(|p| p.get())
|
||||
.unwrap_or(1);
|
||||
let max_parallelism = std::thread::available_parallelism().map_or(1, |p| p.get());
|
||||
|
||||
[1, 2, 4, 8, 16, 32, 64]
|
||||
.into_iter()
|
||||
|
||||
Reference in New Issue
Block a user