tree-wide: run cargo fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-11-29 15:22:43 +01:00
parent 59a4f80422
commit e196f93c3e
2 changed files with 9 additions and 8 deletions

View File

@ -205,7 +205,8 @@ impl Checker {
return Ok(()); return Ok(());
} }
if Path::new("/usr/share/doc/systemd-boot/changelog.Debian.gz").is_file() { if Path::new("/usr/share/doc/systemd-boot/changelog.Debian.gz").is_file() {
self.output.log_pass("bootloader packages installed correctly")?; self.output
.log_pass("bootloader packages installed correctly")?;
return Ok(()); return Ok(());
} }
self.output.log_warn( self.output.log_warn(
@ -216,13 +217,14 @@ impl Checker {
return Ok(()); return Ok(());
} else if !Path::new("/usr/share/doc/grub-efi-amd64/changelog.Debian.gz").is_file() { } else if !Path::new("/usr/share/doc/grub-efi-amd64/changelog.Debian.gz").is_file() {
self.output.log_warn( self.output.log_warn(
"System booted in uefi mode but grub-efi-amd64 meta-package not installed, \ "System booted in uefi mode but grub-efi-amd64 meta-package not installed, \
new grub versions will not be installed to /boot/efi! new grub versions will not be installed to /boot/efi!
Install grub-efi-amd64." Install grub-efi-amd64.",
)?; )?;
return Ok(()); return Ok(());
} else { } else {
self.output.log_pass("bootloader packages installed correctly")?; self.output
.log_pass("bootloader packages installed correctly")?;
} }
Ok(()) Ok(())
@ -287,7 +289,8 @@ impl Checker {
if num_dkms_modules == 0 { if num_dkms_modules == 0 {
self.output.log_pass("no dkms modules found")?; self.output.log_pass("no dkms modules found")?;
} else { } else {
self.output.log_warn("dkms modules found, this might cause issues during upgrade.")?; self.output
.log_warn("dkms modules found, this might cause issues during upgrade.")?;
} }
} }
} }

View File

@ -4,9 +4,7 @@ use std::process::Command;
fn get_top_processes() -> String { fn get_top_processes() -> String {
let (exe, args) = ("top", vec!["-b", "-c", "-w512", "-n", "1", "-o", "TIME"]); let (exe, args) = ("top", vec!["-b", "-c", "-w512", "-n", "1", "-o", "TIME"]);
let output = Command::new(exe) let output = Command::new(exe).args(&args).output();
.args(&args)
.output();
let output = match output { let output = match output {
Ok(output) => String::from_utf8_lossy(&output.stdout).to_string(), Ok(output) => String::from_utf8_lossy(&output.stdout).to_string(),
Err(err) => err.to_string(), Err(err) => err.to_string(),