rust fmt for pbs src

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-04-14 14:03:46 +02:00
parent 50fa7bad49
commit b635dc3ee1

View File

@ -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.