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-mobile-gui 06/20] tree-wide: implement `Default` for types with an `new()` constructor
Date: Fri,  8 May 2026 17:05:21 +0200	[thread overview]
Message-ID: <20260508150535.420205-7-s.sterz@proxmox.com> (raw)
In-Reply-To: <20260508150535.420205-1-s.sterz@proxmox.com>

... that does not take any parameters. fixes the clippy lint
"clippy::new_without_default" [1].

[1]:
https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 src/pages/page_cluster_firewall/mod.rs | 6 ++++++
 src/pages/page_configuartion.rs        | 6 ++++++
 src/pages/page_dashboard.rs            | 6 ++++++
 src/pages/page_login.rs                | 6 ++++++
 src/pages/page_resources.rs            | 6 ++++++
 src/pages/page_settings.rs             | 6 ++++++
 src/widgets/task_list_button.rs        | 6 ++++++
 src/widgets/top_nav_bar.rs             | 6 ++++++
 8 files changed, 48 insertions(+)

diff --git a/src/pages/page_cluster_firewall/mod.rs b/src/pages/page_cluster_firewall/mod.rs
index d422417..6bb8253 100644
--- a/src/pages/page_cluster_firewall/mod.rs
+++ b/src/pages/page_cluster_firewall/mod.rs
@@ -16,6 +16,12 @@ use crate::widgets::TopNavBar;
 #[derive(Clone, PartialEq, Properties)]
 pub struct PageClusterFirewall {}
 
+impl Default for PageClusterFirewall {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl PageClusterFirewall {
     pub fn new() -> Self {
         Self {}
diff --git a/src/pages/page_configuartion.rs b/src/pages/page_configuartion.rs
index debcbd7..36e3a69 100644
--- a/src/pages/page_configuartion.rs
+++ b/src/pages/page_configuartion.rs
@@ -14,6 +14,12 @@ use proxmox_yew_comp::layout::list_tile::icon_list_tile;
 use crate::Route;
 use crate::widgets::TopNavBar;
 
+impl Default for PageConfiguration {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl PageConfiguration {
     pub fn new() -> Self {
         Self {}
diff --git a/src/pages/page_dashboard.rs b/src/pages/page_dashboard.rs
index 18640d4..ff890ca 100644
--- a/src/pages/page_dashboard.rs
+++ b/src/pages/page_dashboard.rs
@@ -26,6 +26,12 @@ use crate::widgets::TopNavBar;
 #[derive(Clone, PartialEq, Properties)]
 pub struct PageDashboard {}
 
+impl Default for PageDashboard {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl PageDashboard {
     pub fn new() -> Self {
         Self {}
diff --git a/src/pages/page_login.rs b/src/pages/page_login.rs
index 98773bf..8b7fa42 100644
--- a/src/pages/page_login.rs
+++ b/src/pages/page_login.rs
@@ -29,6 +29,12 @@ pub struct PageLogin {
     pub consent_text: Option<AttrValue>,
 }
 
+impl Default for PageLogin {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl PageLogin {
     pub fn new() -> Self {
         yew::props!(Self {})
diff --git a/src/pages/page_resources.rs b/src/pages/page_resources.rs
index 20bd124..1365d63 100644
--- a/src/pages/page_resources.rs
+++ b/src/pages/page_resources.rs
@@ -26,6 +26,12 @@ use pve_api_types::{ClusterResource, ClusterResourceType};
 #[derive(Clone, PartialEq, Properties)]
 pub struct PageResources {}
 
+impl Default for PageResources {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl PageResources {
     pub fn new() -> Self {
         Self {}
diff --git a/src/pages/page_settings.rs b/src/pages/page_settings.rs
index 881c219..28ef32d 100644
--- a/src/pages/page_settings.rs
+++ b/src/pages/page_settings.rs
@@ -14,6 +14,12 @@ use proxmox_yew_comp::layout::mobile_form::label_widget;
 #[derive(Clone, PartialEq, Properties)]
 pub struct PageSettings {}
 
+impl Default for PageSettings {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl PageSettings {
     pub fn new() -> Self {
         Self {}
diff --git a/src/widgets/task_list_button.rs b/src/widgets/task_list_button.rs
index 7321b1d..bd42199 100644
--- a/src/widgets/task_list_button.rs
+++ b/src/widgets/task_list_button.rs
@@ -36,6 +36,12 @@ pub struct TasksListButton {
     pub on_show_task_list: Option<Callback<MouseEvent>>,
 }
 
+impl Default for TasksListButton {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl TasksListButton {
     pub fn new() -> Self {
         yew::props!(Self {})
diff --git a/src/widgets/top_nav_bar.rs b/src/widgets/top_nav_bar.rs
index 128ce3e..7adf2ee 100644
--- a/src/widgets/top_nav_bar.rs
+++ b/src/widgets/top_nav_bar.rs
@@ -36,6 +36,12 @@ pub struct TopNavBar {
     menu_items: Vec<MenuEntry>,
 }
 
+impl Default for TopNavBar {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
 impl TopNavBar {
     pub fn new() -> Self {
         yew::props!(Self {})
-- 
2.47.3





  parent reply	other threads:[~2026-05-08 15:06 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08 15:05 [PATCH yew-comp/yew-mobile-gui 00/20] firewall tabs and clean up for pve-yew-mobile-gui Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-comp 01/20] firewall rules panel: correct the url for the pve cluster firewall rules Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 02/20] cargo.toml: globally ignore certain clippy lints Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 03/20] main: avoid unnecessary clones Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 04/20] tree-wide: collapse if statements Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 05/20] tree-wide: implement the `From` trait instead of the `Into` trait Shannon Sterz
2026-05-08 15:05 ` Shannon Sterz [this message]
2026-05-08 15:05 ` [PATCH yew-mobile-gui 07/20] tree-wide: remove unnecessary lazy evaluations Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 08/20] tree-wide: remove needless borrows Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 09/20] configuration page: remove redundant static lifetimes Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 10/20] resources/configuration page: remove useless `.into()` calls Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 11/20] tree-wide: fix several clippy lints Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 12/20] dashboard: use proper plural translation string instead of "CPU(s)" Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 13/20] configuration: clarify that "Firewall" shows the cluster's firewall Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 14/20] cluster/qemu firewall: use rules panel and comment out unused tabs Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 15/20] lxc page: align layout for lxc guest with qemu guests Shannon Sterz
2026-05-08 15:43   ` Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 16/20] lxc: add support for a rudimentary firewall tab for lxc guests Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 17/20] node status: align layout for node status with guest pages Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 18/20] node: add a rudimentary firewall tab for cluster nodes Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 19/20] api types: remove unused file Shannon Sterz
2026-05-08 15:05 ` [PATCH yew-mobile-gui 20/20] resources page: map subscription level analogous to dashboard Shannon Sterz
2026-05-08 15:22   ` Shan Shaji
2026-05-08 15:59 ` Superseded: Re: [PATCH yew-comp/yew-mobile-gui 00/20] firewall tabs and clean up for pve-yew-mobile-gui 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=20260508150535.420205-7-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