chore: Fix build
This commit is contained in:
parent
8a65ac764b
commit
fce8e8b7de
|
@ -334,7 +334,7 @@ pub fn connect<'gc>(
|
|||
pub fn flush<'gc>(
|
||||
avm: &mut Avm1<'gc>,
|
||||
action_context: &mut UpdateContext<'_, 'gc, '_>,
|
||||
_this: Object<'gc>,
|
||||
this: Object<'gc>,
|
||||
_args: &[Value<'gc>],
|
||||
) -> Result<ReturnValue<'gc>, Error> {
|
||||
let data = this
|
||||
|
@ -351,7 +351,8 @@ pub fn flush<'gc>(
|
|||
|
||||
Ok(action_context
|
||||
.storage
|
||||
.put_string(&name, data_json.dump()).into())
|
||||
.put_string(&name, data_json.dump())
|
||||
.into())
|
||||
}
|
||||
|
||||
pub fn get_size<'gc>(
|
||||
|
|
|
@ -48,7 +48,6 @@ impl StorageBackend for DiskStorageBackend {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
fn put_string(&mut self, name: &str, value: String) -> bool {
|
||||
let full_path = self.base_path.join(Path::new(name));
|
||||
|
||||
|
@ -64,13 +63,12 @@ impl StorageBackend for DiskStorageBackend {
|
|||
Err(r) => {
|
||||
log::warn!("Unable to save file {:?}", r);
|
||||
false
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn remove_key(&mut self, name: &str) {
|
||||
let full_path = self.base_path.join(Path::new(name));
|
||||
|
||||
log::info!("[storage] Saved {} to {:?}", value, full_path);
|
||||
let _ = fs::remove_file(full_path);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue