Skip to content

Commit

Permalink
chore: remove unused clone for StoreRevMutDelta (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
xinifinity authored Aug 2, 2023
1 parent 45cd6e6 commit 011ef1b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion firewood/src/storage/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,6 @@ mod tests {
let wal_cfg = WalConfig::builder().build();
let disk_requester = init_buffer(buf_cfg, wal_cfg);

// TODO: Run the test in a separate standalone directory for concurrency reasons
let tmp_dir = TempDir::new("firewood").unwrap();
let path = get_file_path(tmp_dir.path(), file!(), line!());
let (root_db_path, reset) = crate::file::open_dir(path, true).unwrap();
Expand Down
16 changes: 0 additions & 16 deletions firewood/src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,22 +432,6 @@ struct StoreRevMutDelta {
plain: Ash,
}

impl Clone for StoreRevMutDelta {
fn clone(&self) -> Self {
let mut pages = HashMap::new();
for (pid, page) in self.pages.iter() {
let mut data = Box::new([0u8; PAGE_SIZE as usize]);
data.copy_from_slice(page.as_ref());
pages.insert(*pid, data);
}

Self {
pages,
plain: self.plain.clone(),
}
}
}

#[derive(Clone, Debug)]
/// A mutable revision of the store. The view is constucted by applying the `deltas` to the
/// `base space`. The `deltas` tracks both `undo` and `redo` to be able to rewind or reapply
Expand Down

0 comments on commit 011ef1b

Please sign in to comment.