From 5b8881a33e3b0cb42b045a4a2a24dc25940bc691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Wed, 27 Nov 2024 16:52:23 -0300 Subject: [PATCH] {icm20698, leak, pca9685}: Remove 'error' from format string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/icm20689.rs | 2 +- src/leak.rs | 2 +- src/pca9685.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/icm20689.rs b/src/icm20689.rs index d3eace0c9..96dda56a3 100644 --- a/src/icm20689.rs +++ b/src/icm20689.rs @@ -125,7 +125,7 @@ mod tests { fn test_icm20689_pi_4() { let mut imu = Icm20689Device::builder() .build() - .expect("Failed to build ICM20689: {error:?}"); + .expect("Failed to build ICM20689"); for _ in 0..10 { println!("ICM20689 gyroscope: {:?}", imu.read_angular_velocity()); println!("ICM20689 accelerometers: {:?}", imu.read_acceleration()); diff --git a/src/leak.rs b/src/leak.rs index 3fb8e2290..1969f3f1c 100644 --- a/src/leak.rs +++ b/src/leak.rs @@ -84,7 +84,7 @@ mod tests { fn test_leak_pi_4() { let leak = LeakDetector::builder() .build() - .expect("Failed to build leak detector: {error:?}"); + .expect("Failed to build leak detector"); for _ in 0..10 { println!("Leak detector: {}", leak.is_leak_detected().unwrap()); sleep(Duration::from_millis(1000)); diff --git a/src/pca9685.rs b/src/pca9685.rs index 846eac117..0a67cc2d5 100644 --- a/src/pca9685.rs +++ b/src/pca9685.rs @@ -210,7 +210,7 @@ mod tests { for channel in 0..16 { println!("PCA9685: Channel {channel} value {duty_cycle:.1}"); pwm.set_duty_cycle(channel, duty_cycle) - .expect("Error in setting duty cycle: {error:?}"); + .expect("Error in setting duty cycle"); sleep(Duration::from_millis(100)); } }