Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
koehlma committed Dec 22, 2024
1 parent 07a1751 commit 3102333
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
4 changes: 1 addition & 3 deletions crates/rugpi-common/src/artifact/format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ pub struct Metadata {
}

impl Decode for Metadata {
fn decode_segment<R: BufRead>(
mut segment: SegmentDecoder<'_, R>,
) -> Result<Self, DecodeError> {
fn decode_segment<R: BufRead>(mut segment: SegmentDecoder<'_, R>) -> Result<Self, DecodeError> {
let mut key = None;
let mut map = HashMap::new();
while let Some(decoder) = segment.next()? {
Expand Down
6 changes: 2 additions & 4 deletions crates/rugpi-common/src/boot/grub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,8 @@ pub type GrubEnv = HashMap<String, String>;

pub fn load_grub_env<P: AsRef<Path>>(path: P) -> Result<GrubEnv, Report<GrubEnvError>> {
fn inner(path: &Path) -> Result<GrubEnv, Report<GrubEnvError>> {
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())
}
Expand Down
3 changes: 2 additions & 1 deletion crates/rugpi-ctrl/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
};
Expand Down

0 comments on commit 3102333

Please sign in to comment.