From 7e190c3aafd7b7c14af126368f8c35ef150bbf54 Mon Sep 17 00:00:00 2001 From: Andreas Grois Date: Thu, 22 Apr 2021 20:44:06 +0200 Subject: Change format for clock refresh rate once more. It's now optional again, but needs its own block. --- clock/src/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'clock/src') diff --git a/clock/src/lib.rs b/clock/src/lib.rs index da4ee94..79426ce 100644 --- a/clock/src/lib.rs +++ b/clock/src/lib.rs @@ -77,14 +77,14 @@ impl<'c> SwayStatusModuleRunnable for ClockRunnable<'c> { /// maximum update rate was chosen to be way below 1/ms. By coincidence a 16 bit integer fits the /// range of reasonable values nicely. #[derive(Serialize, Deserialize)] -#[serde(untagged)] +#[serde(tag = "Synchronization")] enum ClockRefreshRate { NotSynchronized { - #[serde(rename = "UnsyncedEverySeconds")] + #[serde(rename = "Seconds")] seconds : f32 }, UTCSynchronized { - #[serde(rename = "UTCSyncedUpdatesPerThirtyMinutes")] + #[serde(rename = "PerThirtyMinutes")] updates_per_thirty_minutes : u16 } } @@ -93,7 +93,6 @@ enum ClockRefreshRate { #[serde(rename_all = "PascalCase",default)] struct ClockConfig { format : String, - #[serde(flatten)] refresh_rate : ClockRefreshRate } -- cgit v1.2.3