From 3efe6ad21b853aaa1e2a7e2b60baddfba919f6b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 02:27:43 +0000 Subject: [PATCH 1/5] Update criterion requirement from 0.4 to 0.6 Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version. - [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/bheisler/criterion.rs/compare/0.4.0...0.6.0) --- updated-dependencies: - dependency-name: criterion dependency-version: 0.6.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 277c53a..bbf430c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,7 @@ windows-sys = { version = "0.59.0", features = ["Win32_Foundation"] } async-channel = "2.0.0" async-net = "2.0.0" blocking = "1" -criterion = { version = "0.4", default-features = false, features = ["cargo_bench_support"] } +criterion = { version = "0.6", default-features = false, features = ["cargo_bench_support"] } getrandom = "0.3" signal-hook = "0.3" tempfile = "3" From b8053aaec74b94b4894b76bc4704546731a4f18d Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sat, 26 Jul 2025 14:54:56 +0900 Subject: [PATCH 2/5] Use std::hint::black_box instead deprecated criterion::black_box --- benches/io.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/benches/io.rs b/benches/io.rs index 3163322..4e3b480 100644 --- a/benches/io.rs +++ b/benches/io.rs @@ -1,8 +1,9 @@ //! Benchmarks for a variety of I/O operations. use async_io::Async; -use criterion::{black_box, criterion_group, criterion_main, Criterion}; +use criterion::{criterion_group, criterion_main, Criterion}; use futures_lite::{future, prelude::*}; +use std::hint::black_box; use std::net::{Ipv4Addr, SocketAddr, TcpListener, TcpStream, UdpSocket}; /// Block on a future, either using the I/O driver or simple parking. From c103d33c2dcc85e06db9bea3a0af1b0a82d72287 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sat, 26 Jul 2025 14:56:27 +0900 Subject: [PATCH 3/5] timer.rs too --- benches/timer.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/benches/timer.rs b/benches/timer.rs index 60ae076..ee0b0b4 100644 --- a/benches/timer.rs +++ b/benches/timer.rs @@ -1,8 +1,9 @@ //! Benchmarks for registering timers. use async_io::Timer; -use criterion::{black_box, criterion_group, criterion_main, Criterion}; +use criterion::{criterion_group, criterion_main, Criterion}; use futures_lite::future; +use std::hint::black_box; use std::time::Duration; /// Create a new `Timer` and poll it once to register it into the timer wheel. From 8e71f4daca4cde7a5ddd4b3e43a95444aebfa894 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sat, 26 Jul 2025 15:01:59 +0900 Subject: [PATCH 4/5] clippy is buggy --- benches/io.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/benches/io.rs b/benches/io.rs index 4e3b480..1d6e55f 100644 --- a/benches/io.rs +++ b/benches/io.rs @@ -1,5 +1,7 @@ //! Benchmarks for a variety of I/O operations. +#![allow(clippy::incompatible_msrv)] // false positive: https://github.com/rust-lang/rust-clippy/issues/12257#issuecomment-2093667187 + use async_io::Async; use criterion::{criterion_group, criterion_main, Criterion}; use futures_lite::{future, prelude::*}; From ebcfe20e8161802e1bb32672749521f2952cd4c8 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sat, 26 Jul 2025 15:02:10 +0900 Subject: [PATCH 5/5] timer.rs too --- benches/timer.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/benches/timer.rs b/benches/timer.rs index ee0b0b4..27e51d6 100644 --- a/benches/timer.rs +++ b/benches/timer.rs @@ -1,5 +1,7 @@ //! Benchmarks for registering timers. +#![allow(clippy::incompatible_msrv)] // false positive: https://github.com/rust-lang/rust-clippy/issues/12257#issuecomment-2093667187 + use async_io::Timer; use criterion::{criterion_group, criterion_main, Criterion}; use futures_lite::future;