diff --git a/src/riot-rs-bench/src/cortexm.rs b/src/riot-rs-bench/src/cortexm.rs index 797e03daa..6f8894ac0 100644 --- a/src/riot-rs-bench/src/cortexm.rs +++ b/src/riot-rs-bench/src/cortexm.rs @@ -6,7 +6,7 @@ use cortex_m::{ use crate::Error; #[allow(missing_docs)] -pub fn benchmark ()>(iterations: usize, f: F) -> Result { +pub fn benchmark ()>(iterations: usize, mut f: F) -> Result { let mut p = unsafe { Peripherals::steal() }; // p.SCB.clear_sleepdeep(); diff --git a/src/riot-rs-bench/src/esp.rs b/src/riot-rs-bench/src/esp.rs index 45cf14f6f..8d4627064 100644 --- a/src/riot-rs-bench/src/esp.rs +++ b/src/riot-rs-bench/src/esp.rs @@ -6,7 +6,7 @@ use esp_hal::{ use crate::Error; #[allow(missing_docs)] -pub fn benchmark ()>(iterations: usize, f: F) -> Result { +pub fn benchmark ()>(iterations: usize, mut f: F) -> Result { let mut systimer_periph = unsafe { peripherals::SYSTIMER::steal() }; let timer = SystemTimer::new(&mut systimer_periph); diff --git a/src/riot-rs-bench/src/lib.rs b/src/riot-rs-bench/src/lib.rs index 8c993bb73..4df0d41d7 100644 --- a/src/riot-rs-bench/src/lib.rs +++ b/src/riot-rs-bench/src/lib.rs @@ -29,7 +29,7 @@ cfg_if::cfg_if! { /// Returns [`Error::SystemTimerWrapped`] if the system timer counter has wrapped when /// benchmarking. #[allow(unused_variables)] - pub fn benchmark(iterations: usize, f: F) -> Result { + pub fn benchmark(iterations: usize, f: F) -> Result { unimplemented!(); } }