Skip to content

Commit

Permalink
rename cached.rs to in_mem.rs (#609)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Laine authored Mar 25, 2024
1 parent 061d55c commit edad8d5
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion firewood/benches/hashops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use firewood::{
db::{BatchOp, DbConfig},
merkle::{Bincode, Merkle, TrieHash, TRIE_HASH_LEN},
shale::{
cached::InMemLinearStore,
compact::{CompactHeader, CompactSpace},
disk_address::DiskAddress,
in_mem::InMemLinearStore,
LinearStore, ObjCache, Storable, StoredView,
},
storage::WalConfig,
Expand Down
2 changes: 1 addition & 1 deletion firewood/benches/shale-bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use criterion::{
black_box, criterion_group, criterion_main, profiler::Profiler, Bencher, Criterion,
};
use firewood::shale::{
cached::InMemLinearStore,
compact::{CompactHeader, CompactSpaceHeader},
disk_address::DiskAddress,
in_mem::InMemLinearStore,
LinearStore, Obj, StoredView,
};
use pprof::ProfilerGuard;
Expand Down
4 changes: 2 additions & 2 deletions firewood/src/merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ impl<'a, T: PartialEq> PrefixOverlap<'a, T> {
mod tests {
use super::*;
use crate::merkle::node::PlainCodec;
use shale::cached::InMemLinearStore;
use shale::in_mem::InMemLinearStore;
use test_case::test_case;

fn leaf(path: Vec<u8>, value: Vec<u8>) -> Node {
Expand All @@ -1413,7 +1413,7 @@ mod tests {
{
const RESERVED: usize = 0x1000;

let mut dm = shale::cached::InMemLinearStore::new(0x10000, 0);
let mut dm = shale::in_mem::InMemLinearStore::new(0x10000, 0);
let compact_header = DiskAddress::null();
dm.write(
compact_header.into(),
Expand Down
2 changes: 1 addition & 1 deletion firewood/src/merkle/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ impl BinarySerde for PlainCodec {
#[cfg(test)]
mod tests {
use super::*;
use crate::shale::cached::InMemLinearStore;
use crate::shale::in_mem::InMemLinearStore;
use std::iter::repeat;
use test_case::{test_case, test_matrix};

Expand Down
2 changes: 1 addition & 1 deletion firewood/src/merkle/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ use super::tests::create_test_merkle;
#[cfg(test)]
#[allow(clippy::indexing_slicing, clippy::unwrap_used)]
mod tests {
use crate::{merkle::Bincode, shale::cached::InMemLinearStore};
use crate::{merkle::Bincode, shale::in_mem::InMemLinearStore};

use super::*;
use test_case::test_case;
Expand Down
2 changes: 1 addition & 1 deletion firewood/src/merkle_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{
proof::{Proof, ProofError},
BinarySerde, EncodedNode, Merkle, Ref, RefMut, TrieHash,
},
shale::{self, cached::InMemLinearStore, disk_address::DiskAddress, LinearStore, StoredView},
shale::{self, disk_address::DiskAddress, in_mem::InMemLinearStore, LinearStore, StoredView},
};
use std::num::NonZeroUsize;
use thiserror::Error;
Expand Down
2 changes: 1 addition & 1 deletion firewood/src/shale/compact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ impl<T: Storable + Debug + 'static, M: LinearStore> CompactSpace<T, M> {
mod tests {
use sha3::Digest;

use crate::shale::{self, cached::InMemLinearStore};
use crate::shale::{self, in_mem::InMemLinearStore};

use super::*;

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion firewood/src/shale/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ use thiserror::Error;

use crate::merkle::{LeafNode, Node, Path};

pub mod cached;
pub mod compact;
pub mod disk_address;
pub mod in_mem;

#[derive(Debug, Error)]
#[non_exhaustive]
Expand Down

0 comments on commit edad8d5

Please sign in to comment.