This is an automated email from the ASF dual-hosted git repository. koushiro pushed a commit to branch make-clippy-happy-rust-1.92 in repository https://gitbox.apache.org/repos/asf/opendal.git
commit a998e0ab1877268e837f428f766827fdcc7bfb45 Author: koushiro <[email protected]> AuthorDate: Fri Dec 12 13:48:24 2025 +0800 chore(ci): make clippy happy when using rust 1.92.0 --- core/benches/types/buffer.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/core/benches/types/buffer.rs b/core/benches/types/buffer.rs index 81071dbeb..7f5f5a853 100644 --- a/core/benches/types/buffer.rs +++ b/core/benches/types/buffer.rs @@ -99,20 +99,12 @@ mod iterator { #[divan::bench] fn contiguous(b: Bencher) { b.with_inputs(|| Buffer::from(vec![1; 1_000_000])) - .bench_refs(|buffer| { - loop { - let Some(_) = buffer.next() else { break }; - } - }); + .bench_refs(|buffer| for _ in buffer.by_ref() {}); } #[divan::bench(args = [10, 1_000, 1_000_000])] fn non_contiguous(b: Bencher, parts: usize) { b.with_inputs(|| Buffer::from(vec![1; 1_000_000 / parts].repeat(parts))) - .bench_refs(|buffer| { - loop { - let Some(_) = buffer.next() else { break }; - } - }); + .bench_refs(|buffer| for _ in buffer.by_ref() {}); } }
