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 A9ECC1FF16B for ; Thu, 14 Nov 2024 15:15:40 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1A6EA31941; Thu, 14 Nov 2024 15:15:41 +0100 (CET) From: Christoph Heiss To: pve-devel@lists.proxmox.com Date: Thu, 14 Nov 2024 15:15:27 +0100 Message-ID: <20241114141533.694491-2-c.heiss@proxmox.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241114141533.694491-1-c.heiss@proxmox.com> References: <20241114141533.694491-1-c.heiss@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.028 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [setup.rs, parse-answer.rs, mod.rs, main.rs] Subject: [pve-devel] [PATCH installer v3 1/2] tree-wide: run rustfmt, fix clippy warnings 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" No functional changes. Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * no changes Changes v2 -> v3: * rebased on latest master, mostly new (mechanical) changes proxmox-auto-install-assistant/src/main.rs | 4 ++-- proxmox-auto-installer/tests/parse-answer.rs | 2 +- proxmox-installer-common/src/setup.rs | 5 ++++- proxmox-tui-installer/src/views/mod.rs | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/proxmox-auto-install-assistant/src/main.rs b/proxmox-auto-install-assistant/src/main.rs index bc7d5d8..da1ebda 100644 --- a/proxmox-auto-install-assistant/src/main.rs +++ b/proxmox-auto-install-assistant/src/main.rs @@ -474,7 +474,7 @@ fn get_disks() -> Result>> { } } - let output = match get_udev_properties(&entry.path()) { + let output = match get_udev_properties(entry.path()) { Ok(output) => output, Err(err) => { eprint!("{err}"); @@ -522,7 +522,7 @@ fn get_nics() -> Result>> { for link in links { let path = format!("/sys/class/net/{link}"); - let output = match get_udev_properties(&PathBuf::from(path)) { + let output = match get_udev_properties(PathBuf::from(path)) { Ok(output) => output, Err(err) => { eprint!("{err}"); diff --git a/proxmox-auto-installer/tests/parse-answer.rs b/proxmox-auto-installer/tests/parse-answer.rs index 0e5d6e7..65f8c1e 100644 --- a/proxmox-auto-installer/tests/parse-answer.rs +++ b/proxmox-auto-installer/tests/parse-answer.rs @@ -50,7 +50,7 @@ pub fn setup_test_basic(path: impl AsRef) -> (SetupInfo, LocaleInfo, Runti fn test_parse_answers() { let path = get_test_resource_path().unwrap(); let (setup_info, locales, runtime_info, udev_info) = setup_test_basic(&path); - let mut tests_path = path.clone(); + let mut tests_path = path; tests_path.push("parse_answer"); let test_dir = fs::read_dir(tests_path.clone()).unwrap(); diff --git a/proxmox-installer-common/src/setup.rs b/proxmox-installer-common/src/setup.rs index cd1e8b4..79b17ed 100644 --- a/proxmox-installer-common/src/setup.rs +++ b/proxmox-installer-common/src/setup.rs @@ -12,7 +12,10 @@ use std::{ use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; use crate::{ - options::{BtrfsBootdiskOptions, BtrfsCompressOption, Disk, FsType, ZfsBootdiskOptions, ZfsChecksumOption, ZfsCompressOption}, + options::{ + BtrfsBootdiskOptions, BtrfsCompressOption, Disk, FsType, ZfsBootdiskOptions, + ZfsChecksumOption, ZfsCompressOption, + }, utils::CidrAddress, }; diff --git a/proxmox-tui-installer/src/views/mod.rs b/proxmox-tui-installer/src/views/mod.rs index 673905f..b028543 100644 --- a/proxmox-tui-installer/src/views/mod.rs +++ b/proxmox-tui-installer/src/views/mod.rs @@ -182,7 +182,7 @@ impl NumericEditView { /// /// # Arguments /// * `content` - New, stringified content for the inner [`EditView`]. Must be a valid value - /// according to the containet type `T`. + /// according to the container type `T`. fn content_inner(mut self, content: &str) -> Self { let mut inner = EditView::new(); std::mem::swap(self.inner_mut(), &mut inner); -- 2.47.0 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel