From 71bf1a3b12d68516db6932dc13ad00a715913984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Mon, 24 Jun 2024 10:02:07 +0200 Subject: [PATCH] run cargo fmt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabian Grünbichler --- pbs-config/src/network/mod.rs | 10 ++++++---- pbs-tape/src/sg_pt_changer.rs | 4 +++- proxmox-backup-client/src/main.rs | 4 +--- proxmox-file-restore/src/main.rs | 8 ++------ 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/pbs-config/src/network/mod.rs b/pbs-config/src/network/mod.rs index 14a2c6c35..c5b7775cc 100644 --- a/pbs-config/src/network/mod.rs +++ b/pbs-config/src/network/mod.rs @@ -573,8 +573,9 @@ mod tests { String::try_from(nw_config).unwrap().trim(), r#" iface enp3s0 inet static - address 10.0.0.100/16"#.to_string() - .trim() + address 10.0.0.100/16"# + .to_string() + .trim() ); } @@ -597,8 +598,9 @@ iface enp3s0 inet static r#" iface enp3s0 inet static address 10.0.0.100/16 - gateway 10.0.0.1"#.to_string() - .trim() + gateway 10.0.0.1"# + .to_string() + .trim() ); } diff --git a/pbs-tape/src/sg_pt_changer.rs b/pbs-tape/src/sg_pt_changer.rs index f3387756c..4825e36f3 100644 --- a/pbs-tape/src/sg_pt_changer.rs +++ b/pbs-tape/src/sg_pt_changer.rs @@ -414,7 +414,9 @@ pub fn read_element_status(file: &mut F) -> Result if drive2.element_address == drive.element_address { drive.vendor.clone_from(&drive2.vendor); drive.model.clone_from(&drive2.model); - drive.drive_serial_number.clone_from(&drive2.drive_serial_number); + drive + .drive_serial_number + .clone_from(&drive2.drive_serial_number); } } } diff --git a/proxmox-backup-client/src/main.rs b/proxmox-backup-client/src/main.rs index ecd7b9e9f..003abaef2 100644 --- a/proxmox-backup-client/src/main.rs +++ b/proxmox-backup-client/src/main.rs @@ -1639,9 +1639,7 @@ async fn restore( overwrite_flags.insert(pbs_client::pxar::OverwriteFlags::all()); } - let prelude_path = param["prelude-target"] - .as_str() - .map(PathBuf::from); + let prelude_path = param["prelude-target"].as_str().map(PathBuf::from); let options = pbs_client::pxar::PxarExtractOptions { match_list: &[], diff --git a/proxmox-file-restore/src/main.rs b/proxmox-file-restore/src/main.rs index 8104600d7..69d811fc1 100644 --- a/proxmox-file-restore/src/main.rs +++ b/proxmox-file-restore/src/main.rs @@ -186,12 +186,8 @@ async fn list_files( let accessor = Accessor::new(reader, archive_size).await?; let path = OsStr::from_bytes(&path); - pbs_client::tools::pxar_metadata_catalog_lookup( - accessor, - path, - Some(&archive_name), - ) - .await + pbs_client::tools::pxar_metadata_catalog_lookup(accessor, path, Some(&archive_name)) + .await } } ExtractPath::VM(file, path) => {