This second API seems like it's trying to avoid adding unescessary 'get_or_insert_default()' calls

This commit is contained in:
Mikayla Maki
2025-09-17 23:06:05 -07:00
parent 9f3b251f77
commit d77cefd79a

View File

@@ -136,7 +136,6 @@ impl VsCodeSettings {
}
}
// todo! replace enum_setting
pub fn read_enum<T>(&self, key: &str, f: impl FnOnce(&str) -> Option<T>) -> Option<T> {
self.content.get(key).and_then(Value::as_str).and_then(f)
}