public inbox for yew-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Shannon Sterz <s.sterz@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [PATCH yew-comp 02/15] tree wide: fix clippy lint "new_without_default"
Date: Fri,  6 Mar 2026 12:21:34 +0100	[thread overview]
Message-ID: <20260306112148.208189-3-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#new_without_default
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 .../pve/firewall/firewall_options_cluster_panel.rs          | 6 ++++++
 src/form/pve/firewall_property/log_level_selector.rs        | 6 ++++++
 src/form/pve/firewall_property/log_ratelimit_selector.rs    | 6 ++++++
 src/form/pve/hotplug_feature_selector.rs                    | 6 ++++++
 src/form/pve/lxc_mount_options_selector.rs                  | 6 ++++++
 src/form/pve/pve_guest_selector.rs                          | 6 ++++++
 src/form/pve/pve_network_selector.rs                        | 6 ++++++
 src/form/pve/pve_storage_content_selector.rs                | 6 ++++++
 src/form/pve/pve_vlan_field.rs                              | 6 ++++++
 src/form/pve/qemu_cache_type_selector.rs                    | 6 ++++++
 src/form/pve/qemu_controller_selector.rs                    | 6 ++++++
 src/form/pve/qemu_cpu_flags_list.rs                         | 6 ++++++
 src/form/pve/qemu_disk_format_selector.rs                   | 6 ++++++
 src/form/pve/qemu_disk_size_format_selector.rs              | 6 ++++++
 src/form/pve/qemu_display_type_selector.rs                  | 6 ++++++
 src/form/pve/qemu_ostype_selector.rs                        | 6 ++++++
 src/loadable_component.rs                                   | 6 ++++++
 src/pending_property_view/mod.rs                            | 6 ++++++
 18 files changed, 108 insertions(+)

diff --git a/src/configuration/pve/firewall/firewall_options_cluster_panel.rs b/src/configuration/pve/firewall/firewall_options_cluster_panel.rs
index 112af05..d0156a2 100644
--- a/src/configuration/pve/firewall/firewall_options_cluster_panel.rs
+++ b/src/configuration/pve/firewall/firewall_options_cluster_panel.rs
@@ -38,6 +38,12 @@ pub struct FirewallOptionsClusterPanel {
     pub readonly: bool,
 }
 
+impl Default for FirewallOptionsClusterPanel {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl FirewallOptionsClusterPanel {
     pub fn new() -> Self {
         yew::props!(Self {})
diff --git a/src/form/pve/firewall_property/log_level_selector.rs b/src/form/pve/firewall_property/log_level_selector.rs
index 0c224a3..3a5a0f2 100644
--- a/src/form/pve/firewall_property/log_level_selector.rs
+++ b/src/form/pve/firewall_property/log_level_selector.rs
@@ -11,6 +11,12 @@ use pwt_macros::{builder, widget};
 #[builder]
 pub struct LogLevelSelector {}
 
+impl Default for LogLevelSelector {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl LogLevelSelector {
     /// Create a new instance.
     pub fn new() -> Self {
diff --git a/src/form/pve/firewall_property/log_ratelimit_selector.rs b/src/form/pve/firewall_property/log_ratelimit_selector.rs
index 9b496e7..36f92b3 100644
--- a/src/form/pve/firewall_property/log_ratelimit_selector.rs
+++ b/src/form/pve/firewall_property/log_ratelimit_selector.rs
@@ -32,6 +32,12 @@ pub struct LogRatelimitSelector {
     label_id: Option<AttrValue>,
 }
 
+impl Default for LogRatelimitSelector {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl LogRatelimitSelector {
     pub const RATE_NAME: AttrValue = AttrValue::Static("_lograte_");
     pub const RATE_UNIT: AttrValue = AttrValue::Static("_lograte_unit_");
diff --git a/src/form/pve/hotplug_feature_selector.rs b/src/form/pve/hotplug_feature_selector.rs
index 537a03e..45e4166 100644
--- a/src/form/pve/hotplug_feature_selector.rs
+++ b/src/form/pve/hotplug_feature_selector.rs
@@ -26,6 +26,12 @@ pub struct HotplugFeatureSelector {
     pub mobile: bool,
 }
 
+impl Default for HotplugFeatureSelector {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl HotplugFeatureSelector {
     pub fn new() -> Self {
         yew::props!(Self {})
diff --git a/src/form/pve/lxc_mount_options_selector.rs b/src/form/pve/lxc_mount_options_selector.rs
index 451ad39..7a8d0a5 100644
--- a/src/form/pve/lxc_mount_options_selector.rs
+++ b/src/form/pve/lxc_mount_options_selector.rs
@@ -18,6 +18,12 @@ use pwt_macros::{builder, widget};
 #[builder]
 pub struct LxcMountOptionsSelector {}
 
+impl Default for LxcMountOptionsSelector {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl LxcMountOptionsSelector {
     pub fn new() -> Self {
         yew::props!(Self {})
diff --git a/src/form/pve/pve_guest_selector.rs b/src/form/pve/pve_guest_selector.rs
index 9db1336..f55a6a9 100644
--- a/src/form/pve/pve_guest_selector.rs
+++ b/src/form/pve/pve_guest_selector.rs
@@ -73,6 +73,12 @@ pub struct PveGuestSelector {
     pub mobile: bool,
 }
 
+impl Default for PveGuestSelector {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl PveGuestSelector {
     pub fn new() -> Self {
         yew::props!(Self {})
diff --git a/src/form/pve/pve_network_selector.rs b/src/form/pve/pve_network_selector.rs
index e8cb894..1c9d170 100644
--- a/src/form/pve/pve_network_selector.rs
+++ b/src/form/pve/pve_network_selector.rs
@@ -52,6 +52,12 @@ pub struct PveNetworkSelector {
     pub interface_type: Option<ListNetworksType>,
 }
 
+impl Default for PveNetworkSelector {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl PveNetworkSelector {
     pub fn new() -> Self {
         yew::props!(Self {})
diff --git a/src/form/pve/pve_storage_content_selector.rs b/src/form/pve/pve_storage_content_selector.rs
index 1607e66..fdb3d96 100644
--- a/src/form/pve/pve_storage_content_selector.rs
+++ b/src/form/pve/pve_storage_content_selector.rs
@@ -74,6 +74,12 @@ pub struct PveStorageContentSelector {
     pub mobile: bool,
 }
 
+impl Default for PveStorageContentSelector {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl PveStorageContentSelector {
     pub fn new() -> Self {
         yew::props!(Self {})
diff --git a/src/form/pve/pve_vlan_field.rs b/src/form/pve/pve_vlan_field.rs
index aec03f6..98de8ad 100644
--- a/src/form/pve/pve_vlan_field.rs
+++ b/src/form/pve/pve_vlan_field.rs
@@ -8,6 +8,12 @@ use pwt_macros::widget;
 #[derive(Clone, Properties, PartialEq)]
 pub struct PveVlanField {}
 
+impl Default for PveVlanField {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl PveVlanField {
     pub fn new() -> Self {
         yew::props!(Self {})
diff --git a/src/form/pve/qemu_cache_type_selector.rs b/src/form/pve/qemu_cache_type_selector.rs
index e30403d..ce50ed7 100644
--- a/src/form/pve/qemu_cache_type_selector.rs
+++ b/src/form/pve/qemu_cache_type_selector.rs
@@ -20,6 +20,12 @@ pub struct QemuCacheTypeSelector {
     pub default: Option<AttrValue>,
 }
 
+impl Default for QemuCacheTypeSelector {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl QemuCacheTypeSelector {
     /// Create a new instance.
     pub fn new() -> Self {
diff --git a/src/form/pve/qemu_controller_selector.rs b/src/form/pve/qemu_controller_selector.rs
index 215d794..0622e11 100644
--- a/src/form/pve/qemu_controller_selector.rs
+++ b/src/form/pve/qemu_controller_selector.rs
@@ -33,6 +33,12 @@ pub struct QemuControllerSelector {
     pub exclude_devices: Option<HashSet<String>>,
 }
 
+impl Default for QemuControllerSelector {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl QemuControllerSelector {
     pub fn new() -> Self {
         yew::props!(Self {})
diff --git a/src/form/pve/qemu_cpu_flags_list.rs b/src/form/pve/qemu_cpu_flags_list.rs
index 8aa10a5..becdaf3 100644
--- a/src/form/pve/qemu_cpu_flags_list.rs
+++ b/src/form/pve/qemu_cpu_flags_list.rs
@@ -20,6 +20,12 @@ pub type QemuCpuFlagsComp = ManagedFieldMaster<QemuCpuFlagsField>;
 #[builder]
 pub struct QemuCpuFlags {}
 
+impl Default for QemuCpuFlags {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl QemuCpuFlags {
     pub fn new() -> Self {
         yew::props!(Self {})
diff --git a/src/form/pve/qemu_disk_format_selector.rs b/src/form/pve/qemu_disk_format_selector.rs
index 3468dd8..5b26d2f 100644
--- a/src/form/pve/qemu_disk_format_selector.rs
+++ b/src/form/pve/qemu_disk_format_selector.rs
@@ -38,6 +38,12 @@ pub struct QemuDiskFormatSelector {
     pub on_change: Option<Callback<Option<StorageInfoFormatsDefault>>>,
 }
 
+impl Default for QemuDiskFormatSelector {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl QemuDiskFormatSelector {
     pub fn new() -> Self {
         yew::props!(Self {})
diff --git a/src/form/pve/qemu_disk_size_format_selector.rs b/src/form/pve/qemu_disk_size_format_selector.rs
index 603ee5a..d981f1c 100644
--- a/src/form/pve/qemu_disk_size_format_selector.rs
+++ b/src/form/pve/qemu_disk_size_format_selector.rs
@@ -49,6 +49,12 @@ pub struct QemuDiskSizeFormatSelector {
     default_format: Option<StorageInfoFormatsDefault>,
 }
 
+impl Default for QemuDiskSizeFormatSelector {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl QemuDiskSizeFormatSelector {
     pub const DISK_SIZE: AttrValue = AttrValue::Static("_disk_size_");
     pub const DISK_FORMAT: AttrValue = AttrValue::Static("_disk_format_");
diff --git a/src/form/pve/qemu_display_type_selector.rs b/src/form/pve/qemu_display_type_selector.rs
index d451691..4101545 100644
--- a/src/form/pve/qemu_display_type_selector.rs
+++ b/src/form/pve/qemu_display_type_selector.rs
@@ -20,6 +20,12 @@ pub struct QemuDisplayTypeSelector {
     pub serial_device_list: Option<Rc<Vec<AttrValue>>>,
 }
 
+impl Default for QemuDisplayTypeSelector {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl QemuDisplayTypeSelector {
     /// Create a new instance.
     pub fn new() -> Self {
diff --git a/src/form/pve/qemu_ostype_selector.rs b/src/form/pve/qemu_ostype_selector.rs
index d2180c4..ae04946 100644
--- a/src/form/pve/qemu_ostype_selector.rs
+++ b/src/form/pve/qemu_ostype_selector.rs
@@ -20,6 +20,12 @@ pub struct QemuOstypeSelector {
     pub default: Option<AttrValue>,
 }
 
+impl Default for QemuOstypeSelector {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl QemuOstypeSelector {
     /// Create a new instance.
     pub fn new() -> Self {
diff --git a/src/loadable_component.rs b/src/loadable_component.rs
index 0235f17..09f01db 100644
--- a/src/loadable_component.rs
+++ b/src/loadable_component.rs
@@ -386,6 +386,12 @@ pub struct LoadableComponentState<V: PartialEq> {
     async_pool: AsyncPool,
 }
 
+impl<V: PartialEq> Default for LoadableComponentState<V> {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl<V: PartialEq> LoadableComponentState<V> {
     pub fn new() -> Self {
         Self {
diff --git a/src/pending_property_view/mod.rs b/src/pending_property_view/mod.rs
index 6aa68dd..b084e6a 100644
--- a/src/pending_property_view/mod.rs
+++ b/src/pending_property_view/mod.rs
@@ -37,6 +37,12 @@ pub struct PvePendingConfiguration {
     pub keys: HashSet<String>,
 }
 
+impl Default for PvePendingConfiguration {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl PvePendingConfiguration {
     pub fn new() -> Self {
         Self {
-- 
2.47.3





  parent reply	other threads:[~2026-03-06 11:21 UTC|newest]

Thread overview: 16+ 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 ` Shannon Sterz [this message]
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

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-3-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal