From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 631AF1FF13F for ; Thu, 26 Feb 2026 12:11:50 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id EB42D1D140; Thu, 26 Feb 2026 12:12:46 +0100 (CET) From: Nicolas Frey To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox-offline-mirror 1/3] clippy: elide redundant lifetimes Date: Thu, 26 Feb 2026 12:12:37 +0100 Message-ID: <20260226111239.80602-2-n.frey@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260226111239.80602-1-n.frey@proxmox.com> References: <20260226111239.80602-1-n.frey@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.115 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 KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods RDNS_NONE 0.793 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Message-ID-Hash: 6EBQGZJHG4FE3YCSXIE6VCOJWZHV3W3B X-Message-ID-Hash: 6EBQGZJHG4FE3YCSXIE6VCOJWZHV3W3B X-MailFrom: nfrey@miso.proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: No functional changes. for const, 'static lifetime is the default and `mountpoint_to_path_exists` had needless lifetimes, so fix it Signed-off-by: Nicolas Frey --- src/bin/proxmox-offline-mirror-helper.rs | 2 +- src/medium.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/proxmox-offline-mirror-helper.rs b/src/bin/proxmox-offline-mirror-helper.rs index 0c40338..19bf39e 100644 --- a/src/bin/proxmox-offline-mirror-helper.rs +++ b/src/bin/proxmox-offline-mirror-helper.rs @@ -27,7 +27,7 @@ use proxmox_offline_mirror::helpers::tty::{ use proxmox_offline_mirror::medium::{self, MIRROR_STATE_FILE, MediumState, generate_repo_snippet}; /// Converts a string slice to a Path, if it exists, otherwise returns an error result. -fn mountpoint_to_path_exists<'a>(mountpoint: &'a str) -> Result<&'a Path, Error> { +fn mountpoint_to_path_exists(mountpoint: &str) -> Result<&Path, Error> { let mountpoint = Path::new(mountpoint); if !mountpoint.exists() { bail!("Medium mountpoint doesn't exist."); diff --git a/src/medium.rs b/src/medium.rs index 6d9a456..3eb935d 100644 --- a/src/medium.rs +++ b/src/medium.rs @@ -18,7 +18,7 @@ use crate::mirror::pool; use crate::pool::Pool; use crate::types::{Diff, SNAPSHOT_REGEX, Snapshot}; -pub const MIRROR_STATE_FILE: &'static str = ".mirror-state"; +pub const MIRROR_STATE_FILE: &str = ".mirror-state"; #[derive(Clone, Debug, Serialize, Deserialize)] #[serde(rename_all = "kebab-case")] -- 2.47.3