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 42C381FF13E for ; Fri, 06 Mar 2026 12:21:21 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DA2E01FA4B; Fri, 6 Mar 2026 12:22:27 +0100 (CET) From: Shannon Sterz 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 Message-ID: <20260306112148.208189-3-s.sterz@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260306112148.208189-1-s.sterz@proxmox.com> References: <20260306112148.208189-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: 1772796082196 X-SPAM-LEVEL: Spam detection results: 0 AWL -1.403 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 RCVD_IN_MSPIKE_H2 0.001 Average reputation (+2) 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: 64L5TTJ6MPUIRQKMBJPB4JQOWD377YOD X-Message-ID-Hash: 64L5TTJ6MPUIRQKMBJPB4JQOWD377YOD 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#new_without_default Signed-off-by: Shannon Sterz --- .../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, } +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, } +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, } +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>, } +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; #[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>>, } +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, } +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>>, } +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, } +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 { async_pool: AsyncPool, } +impl Default for LoadableComponentState { + fn default() -> Self { + Self::new() + } +} + impl LoadableComponentState { 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, } +impl Default for PvePendingConfiguration { + fn default() -> Self { + Self::new() + } +} + impl PvePendingConfiguration { pub fn new() -> Self { Self { -- 2.47.3