From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 7621A1FF17E for ; Thu, 13 Nov 2025 14:49:55 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A84051CEC3; Thu, 13 Nov 2025 14:50:36 +0100 (CET) From: Christoph Heiss To: pve-devel@lists.proxmox.com Date: Thu, 13 Nov 2025 14:49:54 +0100 Message-ID: <20251113135023.1038305-7-c.heiss@proxmox.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251113135023.1038305-1-c.heiss@proxmox.com> References: <20251113135023.1038305-1-c.heiss@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1763041805883 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.048 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH installer 6/6] tree-wide: run cargo fmt X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Signed-off-by: Christoph Heiss --- .../src/bin/proxmox-auto-installer.rs | 7 ++++--- proxmox-auto-installer/src/utils.rs | 15 +++++++++------ proxmox-fetch-answer/src/fetch_plugins/http.rs | 7 ++++--- .../src/fetch_plugins/partition.rs | 7 ++++--- proxmox-tui-installer/src/main.rs | 7 ++++--- 5 files changed, 25 insertions(+), 18 deletions(-) diff --git a/proxmox-auto-installer/src/bin/proxmox-auto-installer.rs b/proxmox-auto-installer/src/bin/proxmox-auto-installer.rs index 467ef1b..7614fbb 100644 --- a/proxmox-auto-installer/src/bin/proxmox-auto-installer.rs +++ b/proxmox-auto-installer/src/bin/proxmox-auto-installer.rs @@ -123,9 +123,10 @@ fn main() -> ExitCode { }; if answer.global.reboot_on_error - && let Err(err) = File::create("/run/proxmox-reboot-on-error") { - error!("failed to create reboot-on-error flag-file: {err}"); - } + && let Err(err) = File::create("/run/proxmox-reboot-on-error") + { + error!("failed to create reboot-on-error flag-file: {err}"); + } if answer.global.reboot_mode == RebootMode::PowerOff { if let Err(err) = File::create("/run/proxmox-poweroff-after-install") { diff --git a/proxmox-auto-installer/src/utils.rs b/proxmox-auto-installer/src/utils.rs index f5c3f70..884a08e 100644 --- a/proxmox-auto-installer/src/utils.rs +++ b/proxmox-auto-installer/src/utils.rs @@ -426,9 +426,10 @@ pub fn verify_disks_settings(answer: &Answer) -> Result<()> { } if let answer::FsOptions::LVM(lvm) = &answer.disks.fs_options - && let Some((swapsize, hdsize)) = lvm.swapsize.zip(lvm.hdsize) { - check_swapsize(swapsize, hdsize)?; - } + && let Some((swapsize, hdsize)) = lvm.swapsize.zip(lvm.hdsize) + { + check_swapsize(swapsize, hdsize)?; + } Ok(()) } @@ -437,9 +438,11 @@ pub fn verify_first_boot_settings(answer: &Answer) -> Result<()> { info!("Verifying first boot settings"); if let Some(first_boot) = &answer.first_boot - && first_boot.source == FirstBootHookSourceMode::FromUrl && first_boot.url.is_none() { - bail!("first-boot executable source set to URL, but none specified!"); - } + && first_boot.source == FirstBootHookSourceMode::FromUrl + && first_boot.url.is_none() + { + bail!("first-boot executable source set to URL, but none specified!"); + } Ok(()) } diff --git a/proxmox-fetch-answer/src/fetch_plugins/http.rs b/proxmox-fetch-answer/src/fetch_plugins/http.rs index d6331d8..e2fd633 100644 --- a/proxmox-fetch-answer/src/fetch_plugins/http.rs +++ b/proxmox-fetch-answer/src/fetch_plugins/http.rs @@ -140,9 +140,10 @@ impl FetchFromHTTP { info!("Retrieving default search domain."); for line in read_to_string("/etc/resolv.conf")?.lines() { if let Some((key, value)) = line.split_once(' ') - && key == "search" { - return Ok(value.trim().into()); - } + && key == "search" + { + return Ok(value.trim().into()); + } } bail!("Could not find search domain in resolv.conf."); } diff --git a/proxmox-fetch-answer/src/fetch_plugins/partition.rs b/proxmox-fetch-answer/src/fetch_plugins/partition.rs index f952513..3eac301 100644 --- a/proxmox-fetch-answer/src/fetch_plugins/partition.rs +++ b/proxmox-fetch-answer/src/fetch_plugins/partition.rs @@ -123,9 +123,10 @@ fn check_if_mounted(target_path: &str) -> Result { let mounts = fs::read_to_string("/proc/mounts")?; for line in mounts.lines() { if let Some(mp) = line.split(' ').nth(1) - && mp == target_path { - return Ok(true); - } + && mp == target_path + { + return Ok(true); + } } Ok(false) } diff --git a/proxmox-tui-installer/src/main.rs b/proxmox-tui-installer/src/main.rs index 05e6a8e..d2fd3d8 100644 --- a/proxmox-tui-installer/src/main.rs +++ b/proxmox-tui-installer/src/main.rs @@ -197,9 +197,10 @@ fn installer_setup_late(siv: &mut Cursive) { if !state.in_test_mode { let kmap_id = &state.options.timezone.kb_layout; if let Some(kmap) = state.locales.kmap.get(kmap_id) - && let Err(err) = system::set_keyboard_layout(kmap) { - display_setup_warning(siv, &format!("Failed to apply keyboard layout: {err}")); - } + && let Err(err) = system::set_keyboard_layout(kmap) + { + display_setup_warning(siv, &format!("Failed to apply keyboard layout: {err}")); + } } if state.runtime_info.total_memory < 1024 { -- 2.51.0 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel