public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer 6/6] tree-wide: run cargo fmt
Date: Thu, 13 Nov 2025 14:49:54 +0100	[thread overview]
Message-ID: <20251113135023.1038305-7-c.heiss@proxmox.com> (raw)
In-Reply-To: <20251113135023.1038305-1-c.heiss@proxmox.com>

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
 .../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<bool> {
     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


  parent reply	other threads:[~2025-11-13 13:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13 13:49 [pve-devel] [PATCH installer 0/6] interface name pinning followups Christoph Heiss
2025-11-13 13:49 ` [pve-devel] [PATCH installer 1/6] sys: net: pinning: make interface name checks stricter Christoph Heiss
2025-11-13 13:49 ` [pve-devel] [PATCH installer 2/6] common: " Christoph Heiss
2025-11-13 13:49 ` [pve-devel] [PATCH installer 3/6] test: validate-link-pin-map: give all tests a name Christoph Heiss
2025-11-13 13:49 ` [pve-devel] [PATCH installer 4/6] gui: network: only display pinnable devices in pinning options dialog Christoph Heiss
2025-11-13 13:49 ` [pve-devel] [PATCH installer 5/6] tui: " Christoph Heiss
2025-11-13 13:49 ` Christoph Heiss [this message]
2025-11-13 20:00 ` [pve-devel] applied: [PATCH installer 0/6] interface name pinning followups Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251113135023.1038305-7-c.heiss@proxmox.com \
    --to=c.heiss@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal