From: Shannon Sterz <s.sterz@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [PATCH yew-comp 01/15] tree wide: fix clippy lint "useless_conversion"
Date: Fri, 6 Mar 2026 12:21:33 +0100 [thread overview]
Message-ID: <20260306112148.208189-2-s.sterz@proxmox.com> (raw)
In-Reply-To: <20260306112148.208189-1-s.sterz@proxmox.com>
see:
https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
src/configuration/pve/lxc_network_panel.rs | 2 +-
src/configuration/pve/lxc_resources_panel/desktop.rs | 2 +-
src/configuration/pve/qemu_hardware_panel/desktop.rs | 2 +-
src/editable_property.rs | 2 +-
src/form/pve/firewall_property/log_ratelimit_property.rs | 1 -
src/form/pve/qemu_disk_format_selector.rs | 3 +--
src/form/pve/qemu_property/qemu_memory_property.rs | 4 ++--
src/layout/mobile_form.rs | 2 --
src/property_view/mod.rs | 4 ++--
9 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/src/configuration/pve/lxc_network_panel.rs b/src/configuration/pve/lxc_network_panel.rs
index 34c8fa8..701eb4a 100644
--- a/src/configuration/pve/lxc_network_panel.rs
+++ b/src/configuration/pve/lxc_network_panel.rs
@@ -73,7 +73,7 @@ struct NetworkEntry {
impl ExtractPrimaryKey for NetworkEntry {
fn extract_key(&self) -> Key {
- Key::from(self.key.clone())
+ self.key.clone()
}
}
diff --git a/src/configuration/pve/lxc_resources_panel/desktop.rs b/src/configuration/pve/lxc_resources_panel/desktop.rs
index 72b77fd..2b16133 100644
--- a/src/configuration/pve/lxc_resources_panel/desktop.rs
+++ b/src/configuration/pve/lxc_resources_panel/desktop.rs
@@ -58,7 +58,7 @@ struct ResourceEntry {
impl ExtractPrimaryKey for ResourceEntry {
fn extract_key(&self) -> Key {
- Key::from(self.key.clone())
+ self.key.clone()
}
}
diff --git a/src/configuration/pve/qemu_hardware_panel/desktop.rs b/src/configuration/pve/qemu_hardware_panel/desktop.rs
index 5ad1114..9bc33fb 100644
--- a/src/configuration/pve/qemu_hardware_panel/desktop.rs
+++ b/src/configuration/pve/qemu_hardware_panel/desktop.rs
@@ -63,7 +63,7 @@ struct HardwareEntry {
impl ExtractPrimaryKey for HardwareEntry {
fn extract_key(&self) -> Key {
- Key::from(self.key.clone())
+ self.key.clone()
}
}
diff --git a/src/editable_property.rs b/src/editable_property.rs
index 4d9d459..b1e124c 100644
--- a/src/editable_property.rs
+++ b/src/editable_property.rs
@@ -135,7 +135,7 @@ impl EditableProperty {
pub fn new(name: impl IntoPropValue<Option<AttrValue>>, title: impl Into<AttrValue>) -> Self {
let name = name.into_prop_value();
Self {
- name: name.into(),
+ name: name,
revert_keys: None,
title: title.into(),
required: false,
diff --git a/src/form/pve/firewall_property/log_ratelimit_property.rs b/src/form/pve/firewall_property/log_ratelimit_property.rs
index e58078d..2dbbaad 100644
--- a/src/form/pve/firewall_property/log_ratelimit_property.rs
+++ b/src/form/pve/firewall_property/log_ratelimit_property.rs
@@ -89,5 +89,4 @@ pub fn log_ratelimit_property(mobile: bool) -> EditableProperty {
let form_data = delete_empty_values(&form_data, &[LOG_RATELIMIT_PN], false);
Ok(form_data)
})
- .into()
}
diff --git a/src/form/pve/qemu_disk_format_selector.rs b/src/form/pve/qemu_disk_format_selector.rs
index 8106bcb..3468dd8 100644
--- a/src/form/pve/qemu_disk_format_selector.rs
+++ b/src/form/pve/qemu_disk_format_selector.rs
@@ -114,8 +114,7 @@ impl Component for QemuDiskFormatComp {
.min_width(300)
.show_header(false)
.header_focusable(false)
- .class(pwt::css::FlexFit)
- .into(),
+ .class(pwt::css::FlexFit),
)
.selection(args.selection.clone())
.on_select(args.controller.on_select_callback())
diff --git a/src/form/pve/qemu_property/qemu_memory_property.rs b/src/form/pve/qemu_property/qemu_memory_property.rs
index e057fe5..9a8d50a 100644
--- a/src/form/pve/qemu_property/qemu_memory_property.rs
+++ b/src/form/pve/qemu_property/qemu_memory_property.rs
@@ -185,7 +185,7 @@ pub fn qemu_memory_property(mobile: bool) -> EditableProperty {
if balloon == old_memory && old_memory != current_memory {
form_ctx
.write()
- .set_field_value("balloon", current_memory.clone().into());
+ .set_field_value("balloon", current_memory.clone());
}
}
_ => {}
@@ -194,7 +194,7 @@ pub fn qemu_memory_property(mobile: bool) -> EditableProperty {
if let Some(current_memory) = current_memory {
form_ctx
.write()
- .set_field_value("_old_memory", current_memory.into());
+ .set_field_value("_old_memory", current_memory);
}
})
}
diff --git a/src/layout/mobile_form.rs b/src/layout/mobile_form.rs
index 04f4a62..1f78885 100644
--- a/src/layout/mobile_form.rs
+++ b/src/layout/mobile_form.rs
@@ -7,7 +7,6 @@ pub fn label_widget(label: impl Into<AttrValue>, field: impl Into<Html>) -> Colu
Column::new()
.with_child(FieldLabel::new(label.into()).padding_bottom(PwtSpace::Em(0.3)))
.with_child(field)
- .into()
}
/// Column with label and field
@@ -30,5 +29,4 @@ pub fn label_field(
.class((!enabled).then(|| "pwt-label-disabled")),
)
.with_child(field.label_id(label_id).disabled(!enabled))
- .into()
}
diff --git a/src/property_view/mod.rs b/src/property_view/mod.rs
index 39382f0..2d86415 100644
--- a/src/property_view/mod.rs
+++ b/src/property_view/mod.rs
@@ -31,7 +31,7 @@ pub struct PropertyGridRecord {
impl ExtractPrimaryKey for PropertyGridRecord {
fn extract_key(&self) -> Key {
- Key::from(self.key.clone())
+ self.key.clone()
}
}
@@ -276,7 +276,7 @@ pub fn render_property_value(record: &Value, property: &EditableProperty) -> Htm
match value {
None::<_> | Some(Value::Null) => {
let placeholder = if let Some(placeholder) = &property.placeholder {
- placeholder.to_string().into()
+ placeholder.to_string()
} else {
String::from("-")
};
--
2.47.3
next prev parent reply other threads:[~2026-03-06 11:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 11:21 [PATCH yew-comp 00/15] clippy clean up proxmox-yew-comp Shannon Sterz
2026-03-06 11:21 ` Shannon Sterz [this message]
2026-03-06 11:21 ` [PATCH yew-comp 02/15] tree wide: fix clippy lint "new_without_default" Shannon Sterz
2026-03-06 11:21 ` [PATCH yew-comp 03/15] tree wide: fix clippy lint "redundant_static_lifetimes" Shannon Sterz
2026-03-06 11:21 ` [PATCH yew-comp 04/15] tree wide: fix clippy lint "unnecessary_lazy_evaluations" Shannon Sterz
2026-03-06 11:21 ` [PATCH yew-comp 05/15] tree wide: fix clippy lint "unwrap_or_default" Shannon Sterz
2026-03-06 11:21 ` [PATCH yew-comp 06/15] tree wide: fix clippy lint "clone_on_copy" Shannon Sterz
2026-03-06 11:21 ` [PATCH yew-comp 07/15] tree wide: fix clippy lint "collapsible_else_if" Shannon Sterz
2026-03-06 11:21 ` [PATCH yew-comp 08/15] tree wide: fix various minor clippy lints Shannon Sterz
2026-03-06 11:21 ` [PATCH yew-comp 09/15] tree wide: fix clippy lint "manual_strip" Shannon Sterz
2026-03-06 11:21 ` [PATCH yew-comp 10/15] lxc_property/qemu_property: fix clippy lint "match_like_matches_macro" Shannon Sterz
2026-03-06 11:21 ` [PATCH yew-comp 11/15] firewall_property: fix clippy lint "redundant_guards" Shannon Sterz
2026-03-06 11:21 ` [PATCH yew-comp 12/15] qemu_property: fix clippy lint "redundant_pattern_matching" Shannon Sterz
2026-03-06 11:21 ` [PATCH yew-comp 13/15] qemu_hardware_pane/lxc_resources_panel: allow clippy::enum_variant_names Shannon Sterz
2026-03-06 11:21 ` [PATCH yew-comp 14/15] tree wide: fix clippy lint "large_enum_variant" Shannon Sterz
2026-03-06 11:21 ` [PATCH yew-comp 15/15] tree wide: allow clippy "too_many_arguments" warning selectively Shannon Sterz
2026-03-09 12:54 ` [PATCH yew-comp 00/15] clippy clean up proxmox-yew-comp Dominik Csapak
2026-03-09 13:13 ` Shannon Sterz
2026-03-09 13:15 ` Dominik Csapak
2026-03-09 15:30 ` Superseded: " Shannon Sterz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260306112148.208189-2-s.sterz@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=yew-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.