Improved cache mechanism

This commit is contained in:
Syrus
2020-06-11 14:38:08 -07:00
parent bf03c734fc
commit c6b34ecde3
4 changed files with 11 additions and 12 deletions

View File

@@ -78,7 +78,7 @@ impl Cache for FileSystemCache {
Module::deserialize_from_file(&store, new_path_buf)
}
fn store(&mut self, key: WasmHash, module: Module) -> Result<(), Self::SerializeError> {
fn store(&mut self, key: WasmHash, module: &Module) -> Result<(), Self::SerializeError> {
let filename = key.to_string();
let mut new_path_buf = self.path.clone();