From 3102333ceb7ed701cb890ff9c96d448b6b9d7015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20K=C3=B6hl?= Date: Sun, 22 Dec 2024 12:32:33 +0100 Subject: [PATCH] fix formatting --- crates/rugpi-common/src/artifact/format/mod.rs | 4 +--- crates/rugpi-common/src/boot/grub.rs | 6 ++---- crates/rugpi-ctrl/src/cli.rs | 3 ++- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/crates/rugpi-common/src/artifact/format/mod.rs b/crates/rugpi-common/src/artifact/format/mod.rs index 97181ad..dd130b3 100644 --- a/crates/rugpi-common/src/artifact/format/mod.rs +++ b/crates/rugpi-common/src/artifact/format/mod.rs @@ -106,9 +106,7 @@ pub struct Metadata { } impl Decode for Metadata { - fn decode_segment( - mut segment: SegmentDecoder<'_, R>, - ) -> Result { + fn decode_segment(mut segment: SegmentDecoder<'_, R>) -> Result { let mut key = None; let mut map = HashMap::new(); while let Some(decoder) = segment.next()? { diff --git a/crates/rugpi-common/src/boot/grub.rs b/crates/rugpi-common/src/boot/grub.rs index 14c6611..92814e9 100644 --- a/crates/rugpi-common/src/boot/grub.rs +++ b/crates/rugpi-common/src/boot/grub.rs @@ -162,10 +162,8 @@ pub type GrubEnv = HashMap; pub fn load_grub_env>(path: P) -> Result> { fn inner(path: &Path) -> Result> { - grub_envblk_decode( - &fs::read_to_string(path).whatever("unable to read Grub environment")?, - ) - .whatever("unable to decode Grub environment") + grub_envblk_decode(&fs::read_to_string(path).whatever("unable to read Grub environment")?) + .whatever("unable to decode Grub environment") } inner(path.as_ref()) } diff --git a/crates/rugpi-ctrl/src/cli.rs b/crates/rugpi-ctrl/src/cli.rs index c715aa5..91684e5 100644 --- a/crates/rugpi-ctrl/src/cli.rs +++ b/crates/rugpi-ctrl/src/cli.rs @@ -116,7 +116,8 @@ pub fn main() -> SystemResult<()> { None => { let Some(entry) = system .boot_entries() - .iter().find(|(_, entry)| !entry.active()) + .iter() + .find(|(_, entry)| !entry.active()) else { bail!("unable to find an entry"); };