diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1274bdb..568b452f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: [pull_request] env: - RUST_VERSION: 1.75.0 + RUST_VERSION: 1.81.0 jobs: build: diff --git a/canbench-bin/tests/tests.rs b/canbench-bin/tests/tests.rs index d323c5c8..1b4f927f 100644 --- a/canbench-bin/tests/tests.rs +++ b/canbench-bin/tests/tests.rs @@ -279,17 +279,17 @@ fn reports_scopes_in_new_benchmark() { Benchmark: bench_scope_new (new) total: - instructions: 3411 (new) + instructions: 3579 (new) heap_increase: 0 pages (new) stable_memory_increase: 0 pages (new) scope_1 (scope): - instructions: 1002 (new) + instructions: 1286 (new) heap_increase: 0 pages (new) stable_memory_increase: 0 pages (new) scope_2 (scope): - instructions: 787 (new) + instructions: 740 (new) heap_increase: 0 pages (new) stable_memory_increase: 0 pages (new) @@ -356,17 +356,17 @@ fn reports_scopes_in_existing_benchmark() { Benchmark: bench_scope_exists total: - instructions: 3411 (regressed from 0) + instructions: 3579 (regressed from 0) heap_increase: 0 pages (no change) stable_memory_increase: 0 pages (no change) scope_1 (scope): - instructions: 1002 (regressed by 25.25%) + instructions: 1286 (regressed by 60.75%) heap_increase: 0 pages (improved by 100.00%) stable_memory_increase: 0 pages (no change) scope_2 (scope): - instructions: 787 (new) + instructions: 740 (new) heap_increase: 0 pages (new) stable_memory_increase: 0 pages (new) @@ -400,7 +400,7 @@ fn benchmark_works_with_init_args() { Benchmark: state_check total: - instructions: 804 (no change) + instructions: 867 (no change) heap_increase: 0 pages (no change) stable_memory_increase: 0 pages (no change) @@ -423,7 +423,7 @@ fn benchmark_stable_writes() { Benchmark: write_stable_memory (new) total: - instructions: 49.09 K (new) + instructions: 49.12 K (new) heap_increase: 0 pages (new) stable_memory_increase: 1 pages (new) diff --git a/canbench-rs/src/lib.rs b/canbench-rs/src/lib.rs index 100189a9..639f7471 100644 --- a/canbench-rs/src/lib.rs +++ b/canbench-rs/src/lib.rs @@ -409,7 +409,7 @@ use std::cell::RefCell; use std::collections::BTreeMap; thread_local! { - static SCOPES: RefCell> = RefCell::new(BTreeMap::new()); + static SCOPES: RefCell> = const { RefCell::new(BTreeMap::new()) }; } /// The results of a benchmark. diff --git a/rust-toolchain.toml b/rust-toolchain.toml index b30063f1..5c6d171a 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.75.0" # NOTE: remember to update CI as well. +channel = "1.81.0" # NOTE: remember to update CI as well. targets = ["wasm32-unknown-unknown"] diff --git a/tests/init_arg/canbench_results.yml b/tests/init_arg/canbench_results.yml index 49a50a7e..2e45d97a 100644 --- a/tests/init_arg/canbench_results.yml +++ b/tests/init_arg/canbench_results.yml @@ -4,6 +4,6 @@ benches: state_check: total: heap_delta: 0 - instructions: 804 + instructions: 867 stable_memory_delta: 0 version: 0.1.0 diff --git a/tests/init_arg/src/main.rs b/tests/init_arg/src/main.rs index 4fba7bdb..5f66fde2 100644 --- a/tests/init_arg/src/main.rs +++ b/tests/init_arg/src/main.rs @@ -2,7 +2,7 @@ use canbench_rs::bench; use std::cell::RefCell; thread_local! { - static STATE: RefCell = RefCell::new(String::new()); + static STATE: RefCell = const { RefCell::new(String::new()) }; } // A benchmark that prints the state. #[bench]