5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-02-12 21:58:01 +03:00

api-types: clippy fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2022-07-27 13:29:32 +02:00
parent e1db06705e
commit f680e72fae
10 changed files with 18 additions and 18 deletions

View File

@ -158,7 +158,7 @@ pub const PRUNE_SCHEMA_KEEP_YEARLY: Schema =
.schema();
#[api]
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
/// The order to sort chunks by
pub enum ChunkOrder {
@ -357,7 +357,7 @@ pub struct BackupContent {
}
#[api()]
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
/// Result of a verify operation.
pub enum VerifyState {
@ -1397,7 +1397,7 @@ pub fn parse_ns_and_snapshot(input: &str) -> Result<(BackupNamespace, BackupDir)
match input.rmatch_indices('/').nth(2) {
Some((idx, _)) => {
let ns = BackupNamespace::from_path(&input[..idx])?;
let dir: BackupDir = (&input[idx + 1..]).parse()?;
let dir: BackupDir = input[(idx + 1)..].parse()?;
Ok((ns, dir))
}
None => Ok((BackupNamespace::root(), input.parse()?)),

View File

@ -3,7 +3,7 @@ use anyhow::{bail, Error};
use proxmox_schema::{ApiStringFormat, ApiType, Schema, StringSchema, UpdaterType};
/// Size units for byte sizes
#[derive(Debug, Copy, Clone, PartialEq)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum SizeUnit {
Byte,
// SI (base 10)

View File

@ -102,7 +102,7 @@ pub struct JobScheduleStatus {
}
#[api()]
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
/// When do we send notifications
pub enum Notify {

View File

@ -401,7 +401,7 @@ pub struct APTUpdateInfo {
}
#[api()]
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
/// Node Power command type.
pub enum NodePowerCommand {

View File

@ -33,7 +33,7 @@ pub enum Operation {
}
#[api]
#[derive(Deserialize, Serialize, PartialEq)]
#[derive(Deserialize, Serialize, PartialEq, Eq)]
#[serde(rename_all = "kebab-case")]
/// Maintenance type.
pub enum MaintenanceType {

View File

@ -42,7 +42,7 @@ pub const CIDR_SCHEMA: Schema =
.schema();
#[api()]
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
/// Interface configuration method
pub enum NetworkConfigMethod {
@ -57,7 +57,7 @@ pub enum NetworkConfigMethod {
}
#[api()]
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
#[allow(non_camel_case_types)]
#[repr(u8)]
@ -81,7 +81,7 @@ pub enum LinuxBondMode {
}
#[api()]
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
#[allow(non_camel_case_types)]
#[repr(u8)]
@ -98,7 +98,7 @@ pub enum BondXmitHashPolicy {
}
#[api()]
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
/// Network interface type
pub enum NetworkInterfaceType {

View File

@ -10,7 +10,7 @@ pub const VAULT_NAME_SCHEMA: Schema = StringSchema::new("Vault name.")
.max_length(32)
.schema();
#[derive(Debug, PartialEq, Clone)]
#[derive(Debug, PartialEq, Eq, Clone)]
/// Media location
pub enum MediaLocation {
/// Ready for use (inside tape library)

View File

@ -4,7 +4,7 @@ use proxmox_schema::api;
#[api()]
/// Media status
#[derive(Debug, PartialEq, Copy, Clone, Serialize, Deserialize)]
#[derive(Debug, PartialEq, Eq, Copy, Clone, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
/// Media Status
pub enum MediaStatus {

View File

@ -316,7 +316,7 @@ impl PartialEq<Realm> for RealmRef {
impl PartialEq<Realm> for &RealmRef {
fn eq(&self, rhs: &Realm) -> bool {
(*self).0 == rhs.0
self.0 == rhs.0
}
}
@ -453,7 +453,7 @@ impl Userid {
/// Get the "root@pam" user id.
pub fn root_userid() -> &'static Self {
&*ROOT_USERID
&ROOT_USERID
}
}
@ -586,7 +586,7 @@ impl Authid {
/// Get the "root@pam" auth id.
pub fn root_auth_id() -> &'static Self {
&*ROOT_AUTHID
&ROOT_AUTHID
}
}

View File

@ -17,7 +17,7 @@ pub const ZPOOL_NAME_SCHEMA: Schema = StringSchema::new("ZFS Pool Name")
.schema();
#[api(default: "On")]
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
/// The ZFS compression algorithm to use.
pub enum ZfsCompressionType {
@ -38,7 +38,7 @@ pub enum ZfsCompressionType {
}
#[api()]
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
/// The ZFS RAID level to use.
pub enum ZfsRaidLevel {