[pbs-devel] [PATCH proxmox 05/18] time-api: remove redundant field names

Maximiliano Sandoval m.sandoval at proxmox.com
Wed Jun 26 12:45:01 CEST 2024


Fixes the clippy warning:

warning: redundant field names in struct initialization
  --> proxmox-time-api/src/time_impl.rs:53:9
   |
53 |         localtime: localtime,
   |         ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `localtime`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names

Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
 proxmox-time-api/src/time_impl.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxmox-time-api/src/time_impl.rs b/proxmox-time-api/src/time_impl.rs
index 3d5aee6f..a548c717 100644
--- a/proxmox-time-api/src/time_impl.rs
+++ b/proxmox-time-api/src/time_impl.rs
@@ -49,7 +49,7 @@ pub fn get_server_time_info() -> Result<ServerTimeInfo, Error> {
 
     Ok(ServerTimeInfo {
         timezone: read_etc_localtime()?,
-        time: time,
-        localtime: localtime,
+        time,
+        localtime,
     })
 }
-- 
2.39.2





More information about the pbs-devel mailing list