reorder serde usage/derive

this is deprecated with rustc 1.52+, and will become a hard error at
some point:

https://github.com/rust-lang/rust/issues/79202

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2021-05-31 14:53:08 +02:00
parent 0bca966ec5
commit 3e3b505cc8
7 changed files with 11 additions and 11 deletions

View File

@ -1548,8 +1548,8 @@ impl std::convert::TryFrom<openssl::rsa::Rsa<openssl::pkey::Public>> for RsaPubK
}, },
} }
)] )]
#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize,Default)] #[derive(Serialize,Deserialize,Default)]
#[serde(rename_all="kebab-case")]
/// Job Scheduling Status /// Job Scheduling Status
pub struct JobScheduleStatus { pub struct JobScheduleStatus {
#[serde(skip_serializing_if="Option::is_none")] #[serde(skip_serializing_if="Option::is_none")]

View File

@ -82,8 +82,8 @@ pub const DIR_NAME_SCHEMA: Schema = StringSchema::new("Directory name").schema()
}, },
} }
)] )]
#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize)] #[derive(Serialize,Deserialize)]
#[serde(rename_all="kebab-case")]
/// Datastore configuration properties. /// Datastore configuration properties.
pub struct DataStoreConfig { pub struct DataStoreConfig {
pub name: String, pub name: String,

View File

@ -53,8 +53,8 @@ lazy_static! {
}, },
} }
)] )]
#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize,Clone)] #[derive(Serialize,Deserialize,Clone)]
#[serde(rename_all="kebab-case")]
/// Sync Job /// Sync Job
pub struct SyncJobConfig { pub struct SyncJobConfig {
pub id: String, pub id: String,
@ -82,8 +82,8 @@ pub struct SyncJobConfig {
}, },
)] )]
#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize)] #[derive(Serialize,Deserialize)]
#[serde(rename_all="kebab-case")]
/// Status of Sync Job /// Status of Sync Job
pub struct SyncJobStatus { pub struct SyncJobStatus {
#[serde(flatten)] #[serde(flatten)]

View File

@ -62,8 +62,8 @@ lazy_static! {
}, },
} }
)] )]
#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize,Clone)] #[derive(Serialize,Deserialize,Clone)]
#[serde(rename_all="kebab-case")]
/// Tape Backup Job Setup /// Tape Backup Job Setup
pub struct TapeBackupJobSetup { pub struct TapeBackupJobSetup {
pub store: String, pub store: String,
@ -98,8 +98,8 @@ pub struct TapeBackupJobSetup {
}, },
} }
)] )]
#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize,Clone)] #[derive(Serialize,Deserialize,Clone)]
#[serde(rename_all="kebab-case")]
/// Tape Backup Job /// Tape Backup Job
pub struct TapeBackupJobConfig { pub struct TapeBackupJobConfig {
pub id: String, pub id: String,
@ -121,8 +121,8 @@ pub struct TapeBackupJobConfig {
}, },
}, },
)] )]
#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize)] #[derive(Serialize,Deserialize)]
#[serde(rename_all="kebab-case")]
/// Status of Tape Backup Job /// Status of Tape Backup Job
pub struct TapeBackupJobStatus { pub struct TapeBackupJobStatus {
#[serde(flatten)] #[serde(flatten)]

View File

@ -14,8 +14,8 @@ const LOCK_FILE: &str = configdir!("/token.shadow.lock");
const CONF_FILE: &str = configdir!("/token.shadow"); const CONF_FILE: &str = configdir!("/token.shadow");
const LOCK_TIMEOUT: Duration = Duration::from_secs(5); const LOCK_TIMEOUT: Duration = Duration::from_secs(5);
#[serde(rename_all="kebab-case")]
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
#[serde(rename_all="kebab-case")]
/// ApiToken id / secret pair /// ApiToken id / secret pair
pub struct ApiTokenSecret { pub struct ApiTokenSecret {
pub tokenid: Authid, pub tokenid: Authid,

View File

@ -48,8 +48,8 @@ lazy_static! {
}, },
} }
)] )]
#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize)] #[derive(Serialize,Deserialize)]
#[serde(rename_all="kebab-case")]
/// Verification Job /// Verification Job
pub struct VerificationJobConfig { pub struct VerificationJobConfig {
/// unique ID to address this job /// unique ID to address this job
@ -80,8 +80,8 @@ pub struct VerificationJobConfig {
}, },
}, },
)] )]
#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize)] #[derive(Serialize,Deserialize)]
#[serde(rename_all="kebab-case")]
/// Status of Verification Job /// Status of Verification Job
pub struct VerificationJobStatus { pub struct VerificationJobStatus {
#[serde(flatten)] #[serde(flatten)]

View File

@ -61,8 +61,8 @@ use crate::{
}, },
}; };
#[serde(rename_all = "kebab-case")]
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
/// Represents the State of a specific Job /// Represents the State of a specific Job
pub enum JobState { pub enum JobState {
/// A job was created at 'time', but never started/finished /// A job was created at 'time', but never started/finished