(
map: &mut BTreeMap<String, StoredSettingValue>,
key: &str,
value: StoredSettingValue,
)
| 3700 | } |
| 3701 | |
| 3702 | fn upsert_setting_value( |
| 3703 | map: &mut BTreeMap<String, StoredSettingValue>, |
| 3704 | key: &str, |
| 3705 | value: StoredSettingValue, |
| 3706 | ) -> bool { |
| 3707 | match map.get(key) { |
| 3708 | Some(existing) if existing == &value => false, |
| 3709 | _ => { |
| 3710 | map.insert(key.to_string(), value); |
| 3711 | true |
| 3712 | } |
| 3713 | } |
| 3714 | } |
| 3715 | |
| 3716 | pub(super) async fn load_global_settings(store: &Store) -> Result<StoredSettings, Status> { |
| 3717 | load_settings_record(store, GLOBAL_SETTINGS_OBJECT_TYPE, GLOBAL_SETTINGS_NAME).await |