Skip to content

Commit

Permalink
chore: use type alias memtable in memory_engine
Browse files Browse the repository at this point in the history
Signed-off-by: fangpin <[email protected]>
  • Loading branch information
fangpin committed Nov 26, 2024
1 parent 50cd2c5 commit a6026bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/engine/src/memory_engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl MemoryEngine {
/// New `MemoryEngine`
#[inline]
pub(crate) fn new(tables: &[&'static str]) -> Self {
let mut inner: HashMap<String, HashMap<Vec<u8>, Vec<u8>>> = HashMap::new();
let mut inner: HashMap<String, MemoryTable> = HashMap::new();
for table in tables {
let _ignore = inner.entry((*table).to_owned()).or_default();
}
Expand All @@ -49,7 +49,7 @@ impl MemoryEngine {
/// New `MemoryEngine`
#[cfg(madsim)]
#[inline]
pub(crate) fn new_from_db(db: HashMap<String, HashMap<Vec<u8>, Vec<u8>>>) -> Self {
pub(crate) fn new_from_db(db: HashMap<String, MemoryTable>) -> Self {
Self {
inner: Arc::new(RwLock::new(db)),
}
Expand Down

0 comments on commit a6026bd

Please sign in to comment.