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 6B7861FF136 for ; Mon, 09 Mar 2026 16:30:59 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 93AD6589; Mon, 9 Mar 2026 16:30:52 +0100 (CET) From: Shannon Sterz To: yew-devel@lists.proxmox.com Subject: [PATCH yew-comp v2 10/13] lxc_property/qemu_property: fix clippy lint "match_like_matches_macro" Date: Mon, 9 Mar 2026 16:29:35 +0100 Message-ID: <20260309152938.264532-11-s.sterz@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260309152938.264532-1-s.sterz@proxmox.com> References: <20260309152938.264532-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: 1773070154184 X-SPAM-LEVEL: Spam detection results: 0 AWL -1.386 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_BLACK 3 Contains an URL listed in the URIBL blacklist [rust-lang.github.io] Message-ID-Hash: S2OAVWIZLMSM77NG4T2FR5A2J73JFQ7Q X-Message-ID-Hash: S2OAVWIZLMSM77NG4T2FR5A2J73JFQ7Q 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: see: https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro Signed-off-by: Shannon Sterz --- src/form/pve/lxc_property/lxc_features_property.rs | 5 +---- src/form/pve/qemu_property/qemu_efidisk_property.rs | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/form/pve/lxc_property/lxc_features_property.rs b/src/form/pve/lxc_property/lxc_features_property.rs index 3c712d1..83ddcbb 100644 --- a/src/form/pve/lxc_property/lxc_features_property.rs +++ b/src/form/pve/lxc_property/lxc_features_property.rs @@ -59,10 +59,7 @@ impl Component for LxcFeaturesComp { fn view(&self, ctx: &Context) -> Html { let props = ctx.props(); - let unpriviledged = match props.state.record["unprivileged"] { - Value::Bool(true) => true, - _ => false, - }; + let unpriviledged = matches!(props.state.record["unprivileged"], Value::Bool(true)); let unprivileged_hint = |msg: String| { if !unpriviledged { diff --git a/src/form/pve/qemu_property/qemu_efidisk_property.rs b/src/form/pve/qemu_property/qemu_efidisk_property.rs index 83e028e..3497238 100644 --- a/src/form/pve/qemu_property/qemu_efidisk_property.rs +++ b/src/form/pve/qemu_property/qemu_efidisk_property.rs @@ -89,10 +89,7 @@ impl Component for QemuEfidiskPanelComp { let hint = |msg: String| Container::new().class("pwt-color-warning").with_child(msg); let bios = serde_json::from_value::>(state.record["bios"].clone()); - let show_bios_hint = match bios { - Ok(Some(QemuConfigBios::Ovmf)) => false, - _ => true, - }; + let show_bios_hint = matches!(bios, Ok(Some(QemuConfigBios::Ovmf))); // disable selector if there is no real choice let disable_format_selector = supported_formats.len() <= 1; -- 2.47.3