From: Shannon Sterz <s.sterz@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [PATCH yew-comp 08/15] tree wide: fix various minor clippy lints
Date: Fri, 6 Mar 2026 12:21:40 +0100 [thread overview]
Message-ID: <20260306112148.208189-9-s.sterz@proxmox.com> (raw)
In-Reply-To: <20260306112148.208189-1-s.sterz@proxmox.com>
such as:
* useless_format
* unused_unit
* too_many_arguments
* single_match
* search_is_some
* redundant_pattern_matching
* redundant_guards
* redundant_field_names
* redundant_closure
* partialeq_to_none
* needless_return
* needless_borrows_for_generic_args
* needless_borrow
* needless_bool
* match_like_matches_macro
* map_flatten
* manual_map
* if_same_then_else
* from_over_into
* explicit_auto_deref
* enum_variant_names
* collapsible_if
* nonminimal_bool
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
.../pve/firewall/firewall_rules_panel.rs | 2 +-
src/configuration/pve/lxc_network_panel.rs | 7 +--
.../pve/lxc_resources_panel/desktop.rs | 2 +-
.../pve/lxc_resources_panel/mobile.rs | 2 +-
src/configuration/pve/move_disk_dialog.rs | 2 +-
.../pve/qemu_hardware_panel/desktop.rs | 2 +-
.../pve/qemu_hardware_panel/mobile.rs | 2 +-
src/editable_property.rs | 2 +-
src/form/pve/boot_device_list.rs | 6 +-
.../log_ratelimit_selector.rs | 6 +-
src/form/pve/hotplug_feature_selector.rs | 4 +-
src/form/pve/lxc_mount_options_selector.rs | 4 +-
.../lxc_property/lxc_mount_point_property.rs | 32 ++++-------
src/form/pve/pve_guest_selector.rs | 2 +-
src/form/pve/pve_network_selector.rs | 5 +-
src/form/pve/qemu_cpu_flags_list.rs | 8 +--
.../pve/qemu_disk_size_format_selector.rs | 6 +-
.../pve/qemu_property/qemu_disk_property.rs | 55 ++++++++-----------
.../qemu_property/qemu_display_property.rs | 2 +-
.../pve/qemu_property/qemu_memory_property.rs | 15 +++--
.../qemu_spice_enhancement_property.rs | 4 +-
src/log_view.rs | 2 +-
src/utils/task_descriptions.rs | 4 +-
23 files changed, 74 insertions(+), 102 deletions(-)
diff --git a/src/configuration/pve/firewall/firewall_rules_panel.rs b/src/configuration/pve/firewall/firewall_rules_panel.rs
index 56d687e..3f9a9d0 100644
--- a/src/configuration/pve/firewall/firewall_rules_panel.rs
+++ b/src/configuration/pve/firewall/firewall_rules_panel.rs
@@ -260,7 +260,7 @@ fn render_firewall_rule_mobile(rule: &ListFirewallRules) -> Html {
let prefix = Column::new()
.gap(1)
- .with_child(Container::new().with_child(&rule.pos))
+ .with_child(Container::new().with_child(rule.pos))
.with_child(Container::new().with_child(&rule.ty));
tile.add_child(prefix);
diff --git a/src/configuration/pve/lxc_network_panel.rs b/src/configuration/pve/lxc_network_panel.rs
index ae42ab1..200754d 100644
--- a/src/configuration/pve/lxc_network_panel.rs
+++ b/src/configuration/pve/lxc_network_panel.rs
@@ -233,10 +233,9 @@ impl LoadableComponent for LxcNetworkComp {
move |_| link.change_view(Some(ViewState::Add))
}))
.with_child({
- let msg = match &selected_key {
- Some(key) => Some(super::guest::confirm_remove_message(&key.to_string())),
- None => None,
- };
+ let msg = selected_key
+ .as_ref()
+ .map(|key| super::guest::confirm_remove_message(&key.to_string()));
ConfirmButton::new(tr!("Remove"))
.disabled(disable_remove)
.confirm_message(msg)
diff --git a/src/configuration/pve/lxc_resources_panel/desktop.rs b/src/configuration/pve/lxc_resources_panel/desktop.rs
index 2b16133..a70840f 100644
--- a/src/configuration/pve/lxc_resources_panel/desktop.rs
+++ b/src/configuration/pve/lxc_resources_panel/desktop.rs
@@ -167,7 +167,7 @@ impl PveLxcResourcesPanel {
Some(Value::String(volume)) => volume.clone(),
_ => name.to_string(),
};
- confirm_delete_volume(&*name, &volume, false)
+ confirm_delete_volume(&name, &volume, false)
.on_close(on_done)
.on_confirm({
let on_confirm = on_confirm.clone();
diff --git a/src/configuration/pve/lxc_resources_panel/mobile.rs b/src/configuration/pve/lxc_resources_panel/mobile.rs
index a510565..75c8579 100644
--- a/src/configuration/pve/lxc_resources_panel/mobile.rs
+++ b/src/configuration/pve/lxc_resources_panel/mobile.rs
@@ -242,7 +242,7 @@ impl PveLxcResourcesPanel {
) -> ListTile {
let props = ctx.props();
let menu = self.disk_menu(ctx, name, false, true, false).with_item({
- let volume = record[name].as_str().unwrap_or(&name);
+ let volume = record[name].as_str().unwrap_or(name);
let dialog: Html = confirm_delete_volume(name, volume, true)
.on_close({
let link = ctx.link().clone();
diff --git a/src/configuration/pve/move_disk_dialog.rs b/src/configuration/pve/move_disk_dialog.rs
index 9cd1bde..57d4549 100644
--- a/src/configuration/pve/move_disk_dialog.rs
+++ b/src/configuration/pve/move_disk_dialog.rs
@@ -131,7 +131,7 @@ pub fn move_disk_dialog(
node: node.clone(),
remote: remote.clone(),
guest_type,
- mobile: mobile,
+ mobile,
};
VComp::new::<MoveDiskPanelComp>(Rc::new(props), None).into()
}
diff --git a/src/configuration/pve/qemu_hardware_panel/desktop.rs b/src/configuration/pve/qemu_hardware_panel/desktop.rs
index 4f9b747..1385d9e 100644
--- a/src/configuration/pve/qemu_hardware_panel/desktop.rs
+++ b/src/configuration/pve/qemu_hardware_panel/desktop.rs
@@ -170,7 +170,7 @@ impl PveQemuHardwarePanel {
_ => name.to_string(),
};
let on_confirm = on_confirm.clone();
- confirm_delete_volume(&*name, &volume, false)
+ confirm_delete_volume(&name, &volume, false)
.on_close(on_done)
.on_confirm(move |_| on_confirm.emit(()))
.on_confirm({
diff --git a/src/configuration/pve/qemu_hardware_panel/mobile.rs b/src/configuration/pve/qemu_hardware_panel/mobile.rs
index 46b33e4..432ff60 100644
--- a/src/configuration/pve/qemu_hardware_panel/mobile.rs
+++ b/src/configuration/pve/qemu_hardware_panel/mobile.rs
@@ -379,7 +379,7 @@ impl PveQemuHardwarePanel {
) -> ListTile {
let props = ctx.props();
let menu = self.disk_menu(ctx, name, true, false).with_item({
- let volume = record[name].as_str().unwrap_or(&name);
+ let volume = record[name].as_str().unwrap_or(name);
let dialog: Html = confirm_delete_volume(name, volume, true)
.on_close({
let link = ctx.link().clone();
diff --git a/src/editable_property.rs b/src/editable_property.rs
index b1e124c..dac775a 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,
+ name,
revert_keys: None,
title: title.into(),
required: false,
diff --git a/src/form/pve/boot_device_list.rs b/src/form/pve/boot_device_list.rs
index c0d8808..12d9ad7 100644
--- a/src/form/pve/boot_device_list.rs
+++ b/src/form/pve/boot_device_list.rs
@@ -60,7 +60,7 @@ pub struct PveBootDeviceField {
fn add_disabled_devices(list: &mut Vec<DeviceEntry>, boot_devices: &[(String, String)]) {
let mut disabled_list = Vec::new();
for (device, value) in boot_devices {
- if list.iter().find(|i| &i.name == device).is_none() {
+ if !list.iter().any(|i| &i.name == device) {
disabled_list.push(DeviceEntry {
enabled: false,
name: device.clone(),
@@ -191,9 +191,7 @@ impl ManagedField for PveBootDeviceField {
type Properties = BootDeviceList;
type ValidateClosure = ();
- fn validation_args(_props: &Self::Properties) -> Self::ValidateClosure {
- ()
- }
+ fn validation_args(_props: &Self::Properties) -> Self::ValidateClosure {}
fn validator(_props: &Self::ValidateClosure, value: &Value) -> Result<Value, Error> {
let value = match value {
diff --git a/src/form/pve/firewall_property/log_ratelimit_selector.rs b/src/form/pve/firewall_property/log_ratelimit_selector.rs
index 36f92b3..1a9fc51 100644
--- a/src/form/pve/firewall_property/log_ratelimit_selector.rs
+++ b/src/form/pve/firewall_property/log_ratelimit_selector.rs
@@ -106,9 +106,9 @@ impl Component for LogRatelimitSelectorComp {
}
}
-impl Into<VNode> for LogRatelimitSelector {
- fn into(self) -> VNode {
- let comp = VComp::new::<LogRatelimitSelectorComp>(Rc::new(self), None);
+impl From<LogRatelimitSelector> for VNode {
+ fn from(val: LogRatelimitSelector) -> Self {
+ let comp = VComp::new::<LogRatelimitSelectorComp>(Rc::new(val), None);
VNode::from(comp)
}
}
diff --git a/src/form/pve/hotplug_feature_selector.rs b/src/form/pve/hotplug_feature_selector.rs
index c0322d0..d16c687 100644
--- a/src/form/pve/hotplug_feature_selector.rs
+++ b/src/form/pve/hotplug_feature_selector.rs
@@ -125,9 +125,7 @@ impl ManagedField for PveHotplugFeatureMaster {
type Properties = HotplugFeatureSelector;
type ValidateClosure = ();
- fn validation_args(_props: &Self::Properties) -> Self::ValidateClosure {
- ()
- }
+ fn validation_args(_props: &Self::Properties) -> Self::ValidateClosure {}
fn validator(_props: &Self::ValidateClosure, value: &Value) -> Result<Value, Error> {
let value = match value {
diff --git a/src/form/pve/lxc_mount_options_selector.rs b/src/form/pve/lxc_mount_options_selector.rs
index 7a8d0a5..19f3dbf 100644
--- a/src/form/pve/lxc_mount_options_selector.rs
+++ b/src/form/pve/lxc_mount_options_selector.rs
@@ -69,9 +69,7 @@ impl ManagedField for LxcMountOptionsMaster {
type Properties = LxcMountOptionsSelector;
type ValidateClosure = ();
- fn validation_args(_props: &Self::Properties) -> Self::ValidateClosure {
- ()
- }
+ fn validation_args(_props: &Self::Properties) -> Self::ValidateClosure {}
fn validator(_props: &Self::ValidateClosure, value: &Value) -> Result<Value, Error> {
let value = match value {
diff --git a/src/form/pve/lxc_property/lxc_mount_point_property.rs b/src/form/pve/lxc_property/lxc_mount_point_property.rs
index f02d84f..36f36a0 100644
--- a/src/form/pve/lxc_property/lxc_mount_point_property.rs
+++ b/src/form/pve/lxc_property/lxc_mount_point_property.rs
@@ -75,12 +75,11 @@ impl MountPointComp {
self.unused_volume = props
.unused_disk
.as_ref()
- .map(|unused_disk| {
+ .and_then(|unused_disk| {
props.state.record[unused_disk]
.as_str()
.map(|s| s.to_string())
})
- .flatten()
.unwrap_or_default();
self.used_mount_points = extract_used_mount_points(&props.state.record);
@@ -154,10 +153,8 @@ impl Component for MountPointComp {
Some(Value::String(volume)) => {
if volume.starts_with("/dev/") {
false
- } else if volume_storage(volume).is_some() {
- false
} else {
- true
+ volume_storage(volume).is_none()
}
}
_ => false,
@@ -449,17 +446,15 @@ fn mount_point_property(
}
_ => bail!("got invalid value for unused volume"),
}
- } else if is_create {
- if data[VOLUME_PN].is_null() {
- let image_storage = form_ctx.read().get_field_text(IMAGE_STORAGE);
- let image_size =
- match form_ctx.read().get_last_valid_value(DISK_SIZE_FIELD_NAME) {
- Some(Value::Number(size)) => size.as_f64().unwrap(),
- _ => bail!("got invalid disk size"),
- };
- let image = format!("{image_storage}:{image_size}");
- data[VOLUME_PN] = image.into();
- }
+ } else if is_create && data[VOLUME_PN].is_null() {
+ let image_storage = form_ctx.read().get_field_text(IMAGE_STORAGE);
+ let image_size =
+ match form_ctx.read().get_last_valid_value(DISK_SIZE_FIELD_NAME) {
+ Some(Value::Number(size)) => size.as_f64().unwrap(),
+ _ => bail!("got invalid disk size"),
+ };
+ let image = format!("{image_storage}:{image_size}");
+ data[VOLUME_PN] = image.into();
}
if let Some((_, _, Some(Value::Bool(no_replicate)))) =
form_ctx.read().get_field_data(NOREPLICATE_FIELD_NAME)
@@ -586,10 +581,7 @@ fn volume_storage(volume: &str) -> Option<String> {
static VOLUME_MATCH: Regex = Regex::new(r#"^([a-zA-Z][a-zA-Z0-9\-_.]*[a-zA-Z0-9]):"#).unwrap();
}
match VOLUME_MATCH.with(|r| r.captures(volume)) {
- Some(caps) => match caps.get(1) {
- Some(storage) => Some(storage.as_str().into()),
- None => None,
- },
+ Some(caps) => caps.get(1).map(|storage| storage.as_str().into()),
None => None,
}
}
diff --git a/src/form/pve/pve_guest_selector.rs b/src/form/pve/pve_guest_selector.rs
index e1fcf2d..0e9ea76 100644
--- a/src/form/pve/pve_guest_selector.rs
+++ b/src/form/pve/pve_guest_selector.rs
@@ -103,7 +103,7 @@ impl PveGuestSelectorComp {
percent_encode_component(remote),
)
} else {
- format!("/cluster/resources")
+ "/cluster/resources".to_string()
};
let param = if remote.is_some() {
json!({ "kind": ClusterResourceKind::Vm })
diff --git a/src/form/pve/pve_network_selector.rs b/src/form/pve/pve_network_selector.rs
index 1c9d170..e555c5d 100644
--- a/src/form/pve/pve_network_selector.rs
+++ b/src/form/pve/pve_network_selector.rs
@@ -86,10 +86,7 @@ impl PveNetworkSelectorComp {
format!("/nodes/{}/network", percent_encode_component(&node))
};
- let param = match ty {
- Some(ty) => Some(json!({"type": ty})),
- None => None,
- };
+ let param = ty.map(|ty| json!({"type": ty}));
let mut interfaces: Vec<NetworkInterface> = http_get(url, param).await?;
interfaces.sort_by(|a, b| a.iface.cmp(&b.iface));
diff --git a/src/form/pve/qemu_cpu_flags_list.rs b/src/form/pve/qemu_cpu_flags_list.rs
index becdaf3..048e268 100644
--- a/src/form/pve/qemu_cpu_flags_list.rs
+++ b/src/form/pve/qemu_cpu_flags_list.rs
@@ -87,9 +87,7 @@ impl ManagedField for QemuCpuFlagsField {
type Properties = QemuCpuFlags;
type ValidateClosure = ();
- fn validation_args(_props: &Self::Properties) -> Self::ValidateClosure {
- ()
- }
+ fn validation_args(_props: &Self::Properties) -> Self::ValidateClosure {}
fn validator(_props: &Self::ValidateClosure, value: &Value) -> Result<Value, Error> {
Ok(value.clone())
@@ -103,7 +101,7 @@ impl ManagedField for QemuCpuFlagsField {
("spec-ctrl", tr!("Allows improved Spectre mitigation with Intel CPUs")),
("ssbd", tr!("Protection for \"Speculative Store Bypass\" for Intel models")),
("ibpb", tr!("Allows improved Spectre mitigation with AMD CPUs")),
- ("virt-ssbd", tr!("Basis for \"Speculative Store Bypass\" protection for AMD models")),
+ ("virt-ssbd", tr!("Basis for \"Speculative Store Bypass\" protection for AMD models")),
("amd-ssbd", tr!("Improves Spectre mitigation performance with AMD CPUs, best used with \"virt-ssbd\"")),
("amd-no-ssb", tr!("Notifies guest OS that host is not vulnerable for Spectre on AMD CPUs")),
("pdpe1gb", tr!("Allow guest OS to use 1GB size pages, if host HW supports it")),
@@ -193,7 +191,7 @@ impl ManagedField for QemuCpuFlagsField {
)
.with_child(
RadioButton::new("default")
- .checked(item.enabled == None)
+ .checked(item.enabled.is_none())
.on_input(ctx.link().callback({
let name = name.to_string();
move |_| Msg::Set(name.clone(), None)
diff --git a/src/form/pve/qemu_disk_size_format_selector.rs b/src/form/pve/qemu_disk_size_format_selector.rs
index d981f1c..d689b54 100644
--- a/src/form/pve/qemu_disk_size_format_selector.rs
+++ b/src/form/pve/qemu_disk_size_format_selector.rs
@@ -178,9 +178,9 @@ impl Component for QemuDiskSizeFormatComp {
}
}
-impl Into<VNode> for QemuDiskSizeFormatSelector {
- fn into(self) -> VNode {
- let comp = VComp::new::<QemuDiskSizeFormatComp>(Rc::new(self), None);
+impl From<QemuDiskSizeFormatSelector> for VNode {
+ fn from(val: QemuDiskSizeFormatSelector) -> Self {
+ let comp = VComp::new::<QemuDiskSizeFormatComp>(Rc::new(val), None);
VNode::from(comp)
}
}
diff --git a/src/form/pve/qemu_property/qemu_disk_property.rs b/src/form/pve/qemu_property/qemu_disk_property.rs
index dfdf9ea..c1df4f3 100644
--- a/src/form/pve/qemu_property/qemu_disk_property.rs
+++ b/src/form/pve/qemu_property/qemu_disk_property.rs
@@ -112,12 +112,11 @@ impl DiskPanelComp {
self.unused_volume = props
.unused_disk
.as_ref()
- .map(|unused_disk| {
+ .and_then(|unused_disk| {
props.state.record[unused_disk]
.as_str()
.map(|s| s.to_string())
})
- .flatten()
.unwrap_or_default();
self.used_devices = extract_used_devices(&props.state.record);
@@ -408,13 +407,13 @@ pub fn qemu_disk_property(
Some(name) => {
if name.starts_with("unused") {
let mut title = tr!("Unused Disk");
- if let Some(id) = parse_unused_key(&name) {
+ if let Some(id) = parse_unused_key(name) {
title = title + " " + &id.to_string();
}
(Some(name.clone()), title)
} else {
- (None, tr!("Hard Disk") + " (" + &name + ")")
+ (None, tr!("Hard Disk") + " (" + name + ")")
}
}
None => (None, tr!("Hard Disk")),
@@ -447,11 +446,9 @@ pub fn qemu_disk_property(
record[BUS_DEVICE] = default_device.clone().into();
if let Some(name) = &name {
- if unused_disk.is_none() {
- if !name.starts_with("unused") {
- flatten_device_data(&mut record, name)?;
- record[BUS_DEVICE] = name.clone().into();
- }
+ if unused_disk.is_none() && !name.starts_with("unused") {
+ flatten_device_data(&mut record, name)?;
+ record[BUS_DEVICE] = name.clone().into();
}
}
Ok(record)
@@ -475,26 +472,24 @@ pub fn qemu_disk_property(
}
_ => bail!("got invalid value for unused volume"),
}
- } else if is_create {
- if data[FILE_PN].is_null() {
- let image_storage = form_ctx.read().get_field_text(IMAGE_STORAGE);
- let image_size = match form_ctx
- .read()
- .get_last_valid_value(QemuDiskSizeFormatSelector::DISK_SIZE)
- {
- Some(Value::Number(size)) => size.as_f64().unwrap(),
- _ => bail!("got invalid disk size"),
- };
- let image = format!("{image_storage}:{image_size}");
- data[FILE_PN] = image.into();
+ } else if is_create && data[FILE_PN].is_null() {
+ let image_storage = form_ctx.read().get_field_text(IMAGE_STORAGE);
+ let image_size = match form_ctx
+ .read()
+ .get_last_valid_value(QemuDiskSizeFormatSelector::DISK_SIZE)
+ {
+ Some(Value::Number(size)) => size.as_f64().unwrap(),
+ _ => bail!("got invalid disk size"),
+ };
+ let image = format!("{image_storage}:{image_size}");
+ data[FILE_PN] = image.into();
- let image_format = form_ctx
- .read()
- .get_field_text(QemuDiskSizeFormatSelector::DISK_FORMAT);
+ let image_format = form_ctx
+ .read()
+ .get_field_text(QemuDiskSizeFormatSelector::DISK_FORMAT);
- if !image_format.is_empty() {
- data["_format"] = Value::String(image_format);
- }
+ if !image_format.is_empty() {
+ data["_format"] = Value::String(image_format);
}
}
@@ -687,10 +682,8 @@ pub fn qemu_cdrom_property(
let form_ctx = state.form_ctx;
let image_storage = form_ctx.read().get_field_text(IMAGE_STORAGE);
let file = form_ctx.read().get_field_text(FILE_PN);
- if !image_storage.is_empty() {
- if !file.starts_with(&(image_storage + ":")) {
- form_ctx.write().set_field_value(FILE_PN, "".into());
- }
+ if !image_storage.is_empty() && !file.starts_with(&(image_storage + ":")) {
+ form_ctx.write().set_field_value(FILE_PN, "".into());
}
})
}
diff --git a/src/form/pve/qemu_property/qemu_display_property.rs b/src/form/pve/qemu_property/qemu_display_property.rs
index 0ba9b4b..a0a216e 100644
--- a/src/form/pve/qemu_property/qemu_display_property.rs
+++ b/src/form/pve/qemu_property/qemu_display_property.rs
@@ -36,7 +36,7 @@ fn renderer(_name: &str, value: &Value, _record: &Value) -> Html {
};
if let Some(QemuConfigVgaClipboard::Vnc) = vga.clipboard {
- inner.push(format!("clipboard=vnc"));
+ inner.push("clipboard=vnc".to_string());
};
if !inner.is_empty() {
let inner = inner.join(", ");
diff --git a/src/form/pve/qemu_property/qemu_memory_property.rs b/src/form/pve/qemu_property/qemu_memory_property.rs
index 9a8d50a..3cda41e 100644
--- a/src/form/pve/qemu_property/qemu_memory_property.rs
+++ b/src/form/pve/qemu_property/qemu_memory_property.rs
@@ -180,15 +180,14 @@ pub fn qemu_memory_property(mobile: bool) -> EditableProperty {
let old_memory = form_ctx.read().get_field_value("_old_memory");
let balloon = form_ctx.read().get_last_valid_value("balloon");
- match (&old_memory, ¤t_memory, &balloon) {
- (Some(old_memory), Some(current_memory), Some(balloon)) => {
- if balloon == old_memory && old_memory != current_memory {
- form_ctx
- .write()
- .set_field_value("balloon", current_memory.clone());
- }
+ if let (Some(old_memory), Some(current_memory), Some(balloon)) =
+ (&old_memory, ¤t_memory, &balloon)
+ {
+ if balloon == old_memory && old_memory != current_memory {
+ form_ctx
+ .write()
+ .set_field_value("balloon", current_memory.clone());
}
- _ => {}
}
if let Some(current_memory) = current_memory {
diff --git a/src/form/pve/qemu_property/qemu_spice_enhancement_property.rs b/src/form/pve/qemu_property/qemu_spice_enhancement_property.rs
index 993fe61..c6be8a7 100644
--- a/src/form/pve/qemu_property/qemu_spice_enhancement_property.rs
+++ b/src/form/pve/qemu_property/qemu_spice_enhancement_property.rs
@@ -85,9 +85,9 @@ pub fn qemu_spice_enhancement_property(mobile: bool) -> EditableProperty {
output.push(tr!("Video Streaming") + ": " + &videostreaming.to_string());
}
if output.is_empty() {
- return tr!("none").into();
+ tr!("none").into()
} else {
- return output.join(", ").into();
+ output.join(", ").into()
}
}
Ok(None::<_>) => tr!("none").into(),
diff --git a/src/log_view.rs b/src/log_view.rs
index 05acf3d..20f8f77 100644
--- a/src/log_view.rs
+++ b/src/log_view.rs
@@ -478,7 +478,7 @@ impl Component for PwtLogView {
tag.set_style("line-height", format!("{line_height}px"));
}
- let page_ref = page_ref.take().unwrap_or_else(|| NodeRef::default());
+ let page_ref = page_ref.take().unwrap_or_default();
for item in page.lines.iter() {
tag.add_child(format!("{}\n", item.t));
diff --git a/src/utils/task_descriptions.rs b/src/utils/task_descriptions.rs
index 09156ed..13cb3df 100644
--- a/src/utils/task_descriptions.rs
+++ b/src/utils/task_descriptions.rs
@@ -364,10 +364,10 @@ fn render_prune_job_worker_id(id: Option<String>, what: &str) -> String {
);
}
}
- return format!(
+ format!(
"{what} on {ds_translated} {id}",
ds_translated = tr! {"Datastore"}
- );
+ )
}
proxmox_schema::const_regex! {
--
2.47.3
next prev parent reply other threads:[~2026-03-06 11:21 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 ` [PATCH yew-comp 01/15] tree wide: fix clippy lint "useless_conversion" Shannon Sterz
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 ` Shannon Sterz [this message]
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-9-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.