From b635dc3ee112f822ce46a45260cfc00fa1883b4d Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 14 Apr 2022 14:03:46 +0200 Subject: [PATCH] rust fmt for pbs src Signed-off-by: Thomas Lamprecht --- pbs-api-types/src/maintenance.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pbs-api-types/src/maintenance.rs b/pbs-api-types/src/maintenance.rs index f8d4dad3..dd3de50a 100644 --- a/pbs-api-types/src/maintenance.rs +++ b/pbs-api-types/src/maintenance.rs @@ -1,17 +1,16 @@ -use std::borrow::Cow; use anyhow::{bail, Error}; use serde::{Deserialize, Serialize}; +use std::borrow::Cow; -use proxmox_schema::{api, ApiStringFormat, const_regex, Schema, StringSchema}; +use proxmox_schema::{api, const_regex, ApiStringFormat, Schema, StringSchema}; -const_regex!{ +const_regex! { pub MAINTENANCE_MESSAGE_REGEX = r"^[[:^cntrl:]]*$"; } pub const MAINTENANCE_MESSAGE_FORMAT: ApiStringFormat = ApiStringFormat::Pattern(&MAINTENANCE_MESSAGE_REGEX); - pub const MAINTENANCE_MESSAGE_SCHEMA: Schema = StringSchema::new("Message describing the reason for the maintenance.") .format(&MAINTENANCE_MESSAGE_FORMAT) @@ -27,7 +26,7 @@ pub enum Operation { #[api] #[derive(Deserialize, Serialize, PartialEq)] -#[serde(rename_all="kebab-case")] +#[serde(rename_all = "kebab-case")] /// Maintenance type. pub enum MaintenanceType { /// Only read operations are allowed on the datastore.