mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
Implement Storage trait for egui_web:s local storage bindings
This commit is contained in:
@@ -25,8 +25,8 @@ impl FileStorage {
|
||||
}
|
||||
|
||||
impl egui::app::Storage for FileStorage {
|
||||
fn get_string(&self, key: &str) -> Option<&str> {
|
||||
self.kv.get(key).map(String::as_str)
|
||||
fn get_string(&self, key: &str) -> Option<String> {
|
||||
self.kv.get(key).cloned()
|
||||
}
|
||||
|
||||
fn set_string(&mut self, key: &str, value: String) {
|
||||
|
||||
Reference in New Issue
Block a user