From 77ff778004ff706ec35688f6bb1019dabe326953 Mon Sep 17 00:00:00 2001 From: Andriy Berestovskyy Date: Wed, 13 Nov 2024 12:24:45 +0100 Subject: [PATCH] Fix clippy --- rs/execution_environment/benches/load_simulator_canisters.rs | 4 ++-- rs/rust_canisters/load_simulator/src/main.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rs/execution_environment/benches/load_simulator_canisters.rs b/rs/execution_environment/benches/load_simulator_canisters.rs index def8fd745e7..5820e13f026 100644 --- a/rs/execution_environment/benches/load_simulator_canisters.rs +++ b/rs/execution_environment/benches/load_simulator_canisters.rs @@ -61,7 +61,7 @@ fn setup_env(total_canisters: usize) -> StateMachine { format!( r#"[[{}],[{}]]"#, bytes_to_str(&wasm.clone().bytes()), - bytes_to_str(&vec![]) + bytes_to_str(&[]) ) .as_bytes() .to_vec(), @@ -87,7 +87,7 @@ fn run_load_simulator_canisters(total_canisters: usize, rounds: u64, c: &mut Cri bench.iter_batched( || setup_env(total_canisters), |env| { - for r in 1..=rounds { + for _ in 1..=rounds { env.advance_time(Duration::from_secs(1)); env.tick(); } diff --git a/rs/rust_canisters/load_simulator/src/main.rs b/rs/rust_canisters/load_simulator/src/main.rs index 30be1bff495..ba8adfafb2d 100644 --- a/rs/rust_canisters/load_simulator/src/main.rs +++ b/rs/rust_canisters/load_simulator/src/main.rs @@ -3,7 +3,7 @@ use std::cell::RefCell; use std::time::Duration; thread_local! { - static COUNTER: RefCell = RefCell::new(0); + static COUNTER: RefCell = const { RefCell::new(0) }; } async fn timer_handler() {