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 58AE61FF14F for ; Fri, 08 May 2026 17:57:33 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 39E6B1D4F0; Fri, 8 May 2026 17:57:33 +0200 (CEST) From: Shannon Sterz To: yew-devel@lists.proxmox.com Subject: [PATCH yew-mobile-gui v2 08/21] tree-wide: remove needless borrows Date: Fri, 8 May 2026 17:57:09 +0200 Message-ID: <20260508155722.464564-9-s.sterz@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260508155722.464564-1-s.sterz@proxmox.com> References: <20260508155722.464564-1-s.sterz@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1778255735937 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.116 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [main.rs,rust-lang.github.io] Message-ID-Hash: UF6AXABCENF6762636EKYJEIRC62YMOO X-Message-ID-Hash: UF6AXABCENF6762636EKYJEIRC62YMOO X-MailFrom: s.sterz@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: Yew framework devel list at Proxmox List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: fixes the clippy lint "clippy::needless_borrow" [1]. [1]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow Signed-off-by: Shannon Sterz --- src/main.rs | 2 +- src/pages/page_node_status/services_panel.rs | 2 +- src/widgets/guest_backup_panel.rs | 2 +- src/widgets/task_list_button.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 2a91379..3b22e41 100644 --- a/src/main.rs +++ b/src/main.rs @@ -97,7 +97,7 @@ enum Route { } fn switch(path: &str) -> Vec { - let route = Route::recognize(&path).unwrap(); + let route = Route::recognize(path).unwrap(); switch_route(route) } diff --git a/src/pages/page_node_status/services_panel.rs b/src/pages/page_node_status/services_panel.rs index 6e3e2e0..7e495ee 100644 --- a/src/pages/page_node_status/services_panel.rs +++ b/src/pages/page_node_status/services_panel.rs @@ -87,7 +87,7 @@ impl PveNodeServicesPanel { .map(|s| { ListTile::new() .with_child(title_subtitle_column(s.name.clone(), s.desc.clone())) - .with_child(service_state_icon(&s)) + .with_child(service_state_icon(s)) }) .collect(); diff --git a/src/widgets/guest_backup_panel.rs b/src/widgets/guest_backup_panel.rs index 00f211e..1db0657 100644 --- a/src/widgets/guest_backup_panel.rs +++ b/src/widgets/guest_backup_panel.rs @@ -114,7 +114,7 @@ impl PveGuestBackupPanel { let url = format!( "/nodes/{}/tasks/{}/log", props.node, - percent_encode_component(&upid), + percent_encode_component(upid), ); SideDialog::new() diff --git a/src/widgets/task_list_button.rs b/src/widgets/task_list_button.rs index bd42199..d449428 100644 --- a/src/widgets/task_list_button.rs +++ b/src/widgets/task_list_button.rs @@ -62,7 +62,7 @@ pub enum Msg { impl ProxmoxTaskListButton { fn update_upid(&mut self, ctx: &Context, upid: &str) { self.running_upid = Some(upid.to_string().into()); - let task_descr = format_upid(&upid); + let task_descr = format_upid(upid); self.last_task_status = Some(format!("{task_descr} (running)")); self.check_running_task_status(ctx); } -- 2.47.3