tree-wide: run cargo fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2024-03-25 17:04:17 +01:00
parent 0475421498
commit d73eb3dcf1
4 changed files with 9 additions and 6 deletions

View File

@ -14,7 +14,7 @@ struct Protected {
kid: String, kid: String,
} }
#[cfg_attr(feature="api-types", proxmox_schema::api())] #[cfg_attr(feature = "api-types", proxmox_schema::api())]
/// External Account Bindings /// External Account Bindings
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]

View File

@ -25,9 +25,9 @@ use std::borrow::Borrow;
use std::fmt; use std::fmt;
use anyhow::{bail, format_err, Error}; use anyhow::{bail, format_err, Error};
use const_format::concatcp;
use lazy_static::lazy_static; use lazy_static::lazy_static;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use const_format::concatcp;
use proxmox_schema::{ use proxmox_schema::{
api, const_regex, ApiStringFormat, ApiType, Schema, StringSchema, UpdaterType, api, const_regex, ApiStringFormat, ApiType, Schema, StringSchema, UpdaterType,

View File

@ -240,12 +240,12 @@ impl Authentication {
} }
} }
#[cfg(target_arch="wasm32")] #[cfg(target_arch = "wasm32")]
fn epoch_i64() -> i64 { fn epoch_i64() -> i64 {
(js_sys::Date::now() / 1000.0) as i64 (js_sys::Date::now() / 1000.0) as i64
} }
#[cfg(not(target_arch="wasm32"))] #[cfg(not(target_arch = "wasm32"))]
fn epoch_i64() -> i64 { fn epoch_i64() -> i64 {
use std::time::{SystemTime, UNIX_EPOCH}; use std::time::{SystemTime, UNIX_EPOCH};

View File

@ -223,7 +223,10 @@ impl OutputFormatter for ExtJsFormatter {
for (name, err) in param_err { for (name, err) in param_err {
errors.insert(name, err.to_string()); 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), Err(err) => (err.to_string(), StatusCode::BAD_REQUEST),
} }
@ -233,7 +236,7 @@ impl OutputFormatter for ExtJsFormatter {
} else { } else {
StatusCode::BAD_REQUEST StatusCode::BAD_REQUEST
}; };
(err.to_string(), status) (err.to_string(), status)
}; };
let result = json!({ let result = json!({