From d70ae30a4358aaa82e07948c515c2aa988f4e282 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Mon, 28 Nov 2022 14:26:40 +0100 Subject: [PATCH] use derive 'Default' for ChunkOrder instead of hardcoding the default deep inside the code. This makes it much easier to see what is the actual default the first instance of ChunkOrder::None was only for the test case, were the ordering doe not matter Signed-off-by: Dominik Csapak --- pbs-api-types/src/datastore.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs index dde385c3..d75ead90 100644 --- a/pbs-api-types/src/datastore.rs +++ b/pbs-api-types/src/datastore.rs @@ -158,13 +158,14 @@ pub const PRUNE_SCHEMA_KEEP_YEARLY: Schema = .schema(); #[api] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] /// The order to sort chunks by pub enum ChunkOrder { /// Iterate chunks in the index order None, /// Iterate chunks in inode order + #[default] Inode, }