Skip to content

Commit de489a9

Browse files
committed
Use some useful trail implementations for Stats
1 parent 083c34b commit de489a9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/vm/src/cache.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use crate::wasm_store::{load, save, wasm_hash};
1717
static WASM_DIR: &str = "wasm";
1818
static MODULES_DIR: &str = "modules";
1919

20+
#[derive(Debug, Default, Clone)]
2021
struct Stats {
2122
hits_instance: u32,
2223
hits_module: u32,
@@ -59,11 +60,7 @@ where
5960
modules,
6061
wasm_path,
6162
instances,
62-
stats: Stats {
63-
hits_instance: 0,
64-
hits_module: 0,
65-
misses: 0,
66-
},
63+
stats: Stats::default(),
6764
type_storage: PhantomData::<S> {},
6865
type_api: PhantomData::<A> {},
6966
})

0 commit comments

Comments
 (0)