From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 135721FF0AA for ; Tue, 03 Nov 2026 12:31:48 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 3DB24218F4; Tue, 03 Nov 2026 12:31:47 +0100 (CET) From: Robert Obkircher To: pbs-devel@lists.proxmox.com Subject: [PATCH v1 proxmox-backup 6/8] tree-wide: remove redundant ref keyword in pattern matches Date: Tue, 3 Nov 2026 12:28:42 +0100 Message-ID: <20261103113054.184327-7-r.obkircher@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261103113054.184327-1-r.obkircher@proxmox.com> References: <20261103113054.184327-1-r.obkircher@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793705501634 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.490 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: DD37W3YY65XEMAQL5KGX6VXFNIJH2TID X-Message-ID-Hash: DD37W3YY65XEMAQL5KGX6VXFNIJH2TID X-MailFrom: r.obkircher@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 Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: These are no longer necessary and do not compile in the 2024 edition. Signed-off-by: Robert Obkircher --- pbs-client/src/catalog_shell.rs | 2 +- pbs-client/src/pxar/extract.rs | 2 +- src/api2/config/sync.rs | 2 +- src/tape/inventory.rs | 10 ++++------ src/tape/media_pool.rs | 2 +- src/tape/media_set.rs | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/pbs-client/src/catalog_shell.rs b/pbs-client/src/catalog_shell.rs index 3a923648b..e74725af8 100644 --- a/pbs-client/src/catalog_shell.rs +++ b/pbs-client/src/catalog_shell.rs @@ -488,7 +488,7 @@ impl Shell { accessor: &Accessor, follow_symlinks: &mut Option, ) -> Result<(), Error> { - if let Some(ref mut symlink_count) = follow_symlinks { + if let Some(symlink_count) = follow_symlinks { *symlink_count += 1; if *symlink_count > MAX_SYMLINK_COUNT { bail!("too many levels of symbolic links"); diff --git a/pbs-client/src/pxar/extract.rs b/pbs-client/src/pxar/extract.rs index 2ef3657a6..a1d4eb7c2 100644 --- a/pbs-client/src/pxar/extract.rs +++ b/pbs-client/src/pxar/extract.rs @@ -147,7 +147,7 @@ where let mut prelude_file = open_options .open(path) .with_context(|| format!("error creating prelude file '{path:?}'"))?; - if let pxar::EntryKind::Prelude(ref prelude) = entry.kind() { + if let pxar::EntryKind::Prelude(prelude) = entry.kind() { prelude_file.write_all(prelude.as_ref())?; } else { info!("unexpected entry kind for prelude"); diff --git a/src/api2/config/sync.rs b/src/api2/config/sync.rs index beed6e7e3..4d1a19c9e 100644 --- a/src/api2/config/sync.rs +++ b/src/api2/config/sync.rs @@ -362,7 +362,7 @@ fn keep_previous_key_as_associated( ) { if let Some(prev) = current_active { match associated_keys { - Some(ref mut keys) => { + Some(keys) => { if !keys.contains(prev) { keys.push(prev.clone()); } diff --git a/src/tape/inventory.rs b/src/tape/inventory.rs index 12cca02c6..1ce4570d2 100644 --- a/src/tape/inventory.rs +++ b/src/tape/inventory.rs @@ -532,12 +532,10 @@ impl Inventory { return i64::MAX; } MediaSetPolicy::AlwaysCreate => set_start_time, - MediaSetPolicy::CreateAt(ref event) => { - match event.compute_next_event(set_start_time) { - Ok(Some(next)) => next, - Ok(None) | Err(_) => return i64::MAX, - } - } + MediaSetPolicy::CreateAt(event) => match event.compute_next_event(set_start_time) { + Ok(Some(next)) => next, + Ok(None) | Err(_) => return i64::MAX, + }, }, }; diff --git a/src/tape/media_pool.rs b/src/tape/media_pool.rs index 0cad7ab7d..fdd613d2c 100644 --- a/src/tape/media_pool.rs +++ b/src/tape/media_pool.rs @@ -325,7 +325,7 @@ impl MediaPool { let mut list = Vec::new(); for opt_uuid in self.current_media_set.media_list().iter() { match opt_uuid { - Some(ref uuid) => list.push(uuid), + Some(uuid) => list.push(uuid), None => bail!("current_media_list failed - media set is incomplete"), } } diff --git a/src/tape/media_set.rs b/src/tape/media_set.rs index 147fb643b..29de98e9e 100644 --- a/src/tape/media_set.rs +++ b/src/tape/media_set.rs @@ -59,7 +59,7 @@ impl MediaSet { match self.media_list.last() { None => None, Some(None) => None, - Some(Some(ref last_uuid)) => Some(last_uuid), + Some(Some(last_uuid)) => Some(last_uuid), } } -- 2.47.3