diff options
| author | Andreas Grois <andi@grois.info> | 2021-04-22 20:44:06 +0200 |
|---|---|---|
| committer | Andreas Grois <andi@grois.info> | 2021-04-22 20:44:06 +0200 |
| commit | 7e190c3aafd7b7c14af126368f8c35ef150bbf54 (patch) | |
| tree | 0e0b326903961c030247eb3045b3b4d5e8f4a923 /clock | |
| parent | d380bfdba3a01eeb5647600b1939bbd68741e768 (diff) | |
Change format for clock refresh rate once more.
It's now optional again, but needs its own block.
Diffstat (limited to 'clock')
| -rw-r--r-- | clock/src/lib.rs | 7 |
1 files changed, 3 insertions, 4 deletions
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 } |
