Skip to content

Commit d3aa53a

Browse files
committed
CI fixes
1 parent a838d81 commit d3aa53a

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

embedded-service/src/power/policy/policy.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ where
268268
}
269269

270270
let (event, index) = select_slice(pin!(&mut futures)).await;
271+
// Panic safety: The index is guaranteed to be within bounds since it comes from the select_slice result
272+
#[allow(clippy::unwrap_used)]
271273
let device = self
272274
.devices()
273275
.iter_only::<device::Device<'static, D, R>>()

examples/std/src/bin/power_policy.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ impl DeviceTrait for ExampleDevice<'_> {
7272
}
7373

7474
async fn connect_provider(&mut self, capability: ProviderPowerCapability) -> Result<(), Error> {
75-
debug!("ExampleDevice connect_provider with {:?}", capability);
75+
debug!("ExampleDevice connect_provider with {capability:?}");
7676
Ok(())
7777
}
7878

7979
async fn connect_consumer(&mut self, capability: ConsumerPowerCapability) -> Result<(), Error> {
80-
debug!("ExampleDevice connect_consumer with {:?}", capability);
80+
debug!("ExampleDevice connect_consumer with {capability:?}");
8181
Ok(())
8282
}
8383
}

power-policy-service/src/task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use embedded_services::{
66
sync::Lockable,
77
};
88

9-
use crate::{PowerPolicy};
9+
use crate::PowerPolicy;
1010

1111
#[derive(Debug, Clone, Copy)]
1212
#[cfg_attr(feature = "defmt", derive(defmt::Format))]

power-policy-service/tests/common/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub async fn run_test<F: Future<Output = ()>>(
8585
> = StaticCell::new();
8686
let device0_registration = DEVICE0_REGISTRATION.init(device::Device::new(DeviceId(0), device0, device0_receiver));
8787

88-
policy::register_device(device0_registration).await.unwrap();
88+
policy::register_device(device0_registration).unwrap();
8989

9090
static DEVICE1_EVENT_CHANNEL: StaticCell<Channel<GlobalRawMutex, RequestData, EVENT_CHANNEL_SIZE>> =
9191
StaticCell::new();
@@ -107,7 +107,7 @@ pub async fn run_test<F: Future<Output = ()>>(
107107
> = StaticCell::new();
108108
let device1_registration = DEVICE1_REGISTRATION.init(device::Device::new(DeviceId(1), device1, device1_receiver));
109109

110-
policy::register_device(device1_registration).await.unwrap();
110+
policy::register_device(device1_registration).unwrap();
111111

112112
static POWER_POLICY: StaticCell<
113113
PowerPolicy<

0 commit comments

Comments
 (0)