diff --git a/libs/userprefs/src/lib.rs b/libs/userprefs/src/lib.rs index f386636a1..e251d6f6f 100644 --- a/libs/userprefs/src/lib.rs +++ b/libs/userprefs/src/lib.rs @@ -30,9 +30,11 @@ impl From for Error { } } -#[derive( - bincode::Encode, bincode::Decode, PartialEq, Debug, Default, prefsgenerator::GetterSetter, -)] +/// UserPrefs defines the set of all the user preference toggles available for Precursor. +/// Setters and getters are PDDB-aware, and are generated by the `prefsgenerator::GetterSetter` macro. +/// To add a new preference setting just drop a new struct entry in here. +/// The struct field type must be serializable by bincode. +#[derive(prefsgenerator::GetterSetter)] struct UserPrefs { radio_on_on_boot: bool, connect_known_networks_on_boot: bool, @@ -94,11 +96,4 @@ impl Default for Manager { fn default() -> Self { Self::new() } -} - -mod test { - #[test] - fn describe() { - use crate::Manager; - let _m = Manager::new(); -} +} \ No newline at end of file