Skip to content

Commit

Permalink
Merge pull request #97 from nuttycom/shardtree_store_ref
Browse files Browse the repository at this point in the history
shardtree: Add an accessor for a `ShardTree`'s underlying `ShardStore`
  • Loading branch information
nuttycom authored Mar 11, 2024
2 parents 643e4ee + 214d76e commit 07564ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions shardtree/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to Rust's notion of

## Unreleased

## Added
* `Shardtree::store`

## [0.2.0] - 2023-11-07

## Added
Expand Down
5 changes: 5 additions & 0 deletions shardtree/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ impl<
self.store
}

/// Returns a reference to the underlying [`ShardStore`].
pub fn store(&self) -> &S {
&self.store
}

/// Returns the root address of the tree.
pub fn root_addr() -> Address {
Address::from_parts(Level::from(DEPTH), 0)
Expand Down

0 comments on commit 07564ea

Please sign in to comment.