all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox 1/2] tree-wide: format code using `cargo fmt`
@ 2023-12-05 12:31 Lukas Wagner
  2023-12-05 12:31 ` [pbs-devel] [PATCH proxmox 2/2] tree-wide: clippy fixes Lukas Wagner
  0 siblings, 1 reply; 2+ messages in thread
From: Lukas Wagner @ 2023-12-05 12:31 UTC (permalink / raw)
  To: pbs-devel

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
 proxmox-login/src/ticket.rs          |  4 ++--
 proxmox-notify/src/lib.rs            | 13 ++++++++++---
 proxmox-rest-server/src/formatter.rs |  7 +++++--
 3 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/proxmox-login/src/ticket.rs b/proxmox-login/src/ticket.rs
index b37952c..9543b70 100644
--- a/proxmox-login/src/ticket.rs
+++ b/proxmox-login/src/ticket.rs
@@ -240,12 +240,12 @@ impl Authentication {
     }
 }
 
-#[cfg(target_arch="wasm32")]
+#[cfg(target_arch = "wasm32")]
 fn epoch_i64() -> i64 {
     (js_sys::Date::now() / 1000.0) as i64
 }
 
-#[cfg(not(target_arch="wasm32"))]
+#[cfg(not(target_arch = "wasm32"))]
 fn epoch_i64() -> i64 {
     use std::time::{SystemTime, UNIX_EPOCH};
 
diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs
index 1fb9623..3f97332 100644
--- a/proxmox-notify/src/lib.rs
+++ b/proxmox-notify/src/lib.rs
@@ -278,14 +278,21 @@ impl Config {
                     if let Some(obj) = value.as_object_mut() {
                         obj.insert("origin".to_string(), Value::String("builtin".into()));
                     } else {
-                        log::error!("section config entry is not an object. This should not happen");
+                        log::error!(
+                            "section config entry is not an object. This should not happen"
+                        );
                     }
                 } else {
                     // Entry is built-in, but it has been modified by the user.
                     if let Some(obj) = value.as_object_mut() {
-                        obj.insert("origin".to_string(), Value::String("modified-builtin".into()));
+                        obj.insert(
+                            "origin".to_string(),
+                            Value::String("modified-builtin".into()),
+                        );
                     } else {
-                        log::error!("section config entry is not an object. This should not happen");
+                        log::error!(
+                            "section config entry is not an object. This should not happen"
+                        );
                     }
                 }
             } else {
diff --git a/proxmox-rest-server/src/formatter.rs b/proxmox-rest-server/src/formatter.rs
index d19d680..793d6b1 100644
--- a/proxmox-rest-server/src/formatter.rs
+++ b/proxmox-rest-server/src/formatter.rs
@@ -223,7 +223,10 @@ impl OutputFormatter for ExtJsFormatter {
                     for (name, err) in param_err {
                         errors.insert(name, err.to_string());
                     }
-                    (String::from("parameter verification errors"), StatusCode::BAD_REQUEST)
+                    (
+                        String::from("parameter verification errors"),
+                        StatusCode::BAD_REQUEST,
+                    )
                 }
                 Err(err) => (err.to_string(), StatusCode::BAD_REQUEST),
             }
@@ -233,7 +236,7 @@ impl OutputFormatter for ExtJsFormatter {
             } else {
                 StatusCode::BAD_REQUEST
             };
-            (err.to_string(),  status)
+            (err.to_string(), status)
         };
 
         let result = json!({
-- 
2.39.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-05 12:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-05 12:31 [pbs-devel] [PATCH proxmox 1/2] tree-wide: format code using `cargo fmt` Lukas Wagner
2023-12-05 12:31 ` [pbs-devel] [PATCH proxmox 2/2] tree-wide: clippy fixes Lukas Wagner

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal