Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
reorder serde usage/derive
Browse files Browse the repository at this point in the history
this is deprecated with rustc 1.52+, and will become a hard error at
some point:

rust-lang/rust#79202

Signed-off-by: Fabian Grünbichler <[email protected]>
  • Loading branch information
Fabian-Gruenbichler committed May 31, 2021
1 parent 0bca966 commit 3e3b505
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/api2/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
#[serde(rename_all="kebab-case")]
/// Job Scheduling Status
pub struct JobScheduleStatus {
#[serde(skip_serializing_if="Option::is_none")]
Expand Down
2 changes: 1 addition & 1 deletion src/config/datastore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ pub const DIR_NAME_SCHEMA: Schema = StringSchema::new("Directory name").schema()
},
}
)]
#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize)]
#[serde(rename_all="kebab-case")]
/// Datastore configuration properties.
pub struct DataStoreConfig {
pub name: String,
Expand Down
4 changes: 2 additions & 2 deletions src/config/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ lazy_static! {
},
}
)]
#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize,Clone)]
#[serde(rename_all="kebab-case")]
/// Sync Job
pub struct SyncJobConfig {
pub id: String,
Expand Down Expand Up @@ -82,8 +82,8 @@ pub struct SyncJobConfig {
},
)]

#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize)]
#[serde(rename_all="kebab-case")]
/// Status of Sync Job
pub struct SyncJobStatus {
#[serde(flatten)]
Expand Down
6 changes: 3 additions & 3 deletions src/config/tape_job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ lazy_static! {
},
}
)]
#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize,Clone)]
#[serde(rename_all="kebab-case")]
/// Tape Backup Job Setup
pub struct TapeBackupJobSetup {
pub store: String,
Expand Down Expand Up @@ -98,8 +98,8 @@ pub struct TapeBackupJobSetup {
},
}
)]
#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize,Clone)]
#[serde(rename_all="kebab-case")]
/// Tape Backup Job
pub struct TapeBackupJobConfig {
pub id: String,
Expand All @@ -121,8 +121,8 @@ pub struct TapeBackupJobConfig {
},
},
)]
#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize)]
#[serde(rename_all="kebab-case")]
/// Status of Tape Backup Job
pub struct TapeBackupJobStatus {
#[serde(flatten)]
Expand Down
2 changes: 1 addition & 1 deletion src/config/token_shadow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const LOCK_FILE: &str = configdir!("/token.shadow.lock");
const CONF_FILE: &str = configdir!("/token.shadow");
const LOCK_TIMEOUT: Duration = Duration::from_secs(5);

#[serde(rename_all="kebab-case")]
#[derive(Serialize, Deserialize)]
#[serde(rename_all="kebab-case")]
/// ApiToken id / secret pair
pub struct ApiTokenSecret {
pub tokenid: Authid,
Expand Down
4 changes: 2 additions & 2 deletions src/config/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ lazy_static! {
},
}
)]
#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize)]
#[serde(rename_all="kebab-case")]
/// Verification Job
pub struct VerificationJobConfig {
/// unique ID to address this job
Expand Down Expand Up @@ -80,8 +80,8 @@ pub struct VerificationJobConfig {
},
},
)]
#[serde(rename_all="kebab-case")]
#[derive(Serialize,Deserialize)]
#[serde(rename_all="kebab-case")]
/// Status of Verification Job
pub struct VerificationJobStatus {
#[serde(flatten)]
Expand Down
2 changes: 1 addition & 1 deletion src/server/jobstate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ use crate::{
},
};

#[serde(rename_all = "kebab-case")]
#[derive(Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
/// Represents the State of a specific Job
pub enum JobState {
/// A job was created at 'time', but never started/finished
Expand Down

0 comments on commit 3e3b505

Please sign in to comment.