From: Lukas Wagner <l.wagner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox 1/2] tree-wide: format code using `cargo fmt`
Date: Tue, 5 Dec 2023 13:31:14 +0100 [thread overview]
Message-ID: <20231205123115.187815-1-l.wagner@proxmox.com> (raw)
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
next reply other threads:[~2023-12-05 12:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-05 12:31 Lukas Wagner [this message]
2023-12-05 12:31 ` [pbs-devel] [PATCH proxmox 2/2] tree-wide: clippy fixes Lukas Wagner
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=20231205123115.187815-1-l.wagner@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=pbs-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 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