Apply documentation suggestions from code review
Co-authored-by: Jack Grigg <thestr4d@gmail.com>
This commit is contained in:
parent
9a77e51cc4
commit
3f59900acf
|
@ -19,8 +19,10 @@ pub trait Tree<H, C> {
|
||||||
/// Returns the number of levels in the tree.
|
/// Returns the number of levels in the tree.
|
||||||
fn depth(&self) -> u8;
|
fn depth(&self) -> u8;
|
||||||
|
|
||||||
/// Appends a new value to the tree at the next available slot. Returns true if successful and
|
/// Appends a new value to the tree at the next available slot.
|
||||||
/// false if the tree would exceed the maximum allowed number of levels in the tree.
|
///
|
||||||
|
/// Returns true if successful and false if the tree would exceed
|
||||||
|
/// the maximum allowed number of levels in the tree.
|
||||||
fn append(&mut self, value: H, retention: Retention<C>) -> bool;
|
fn append(&mut self, value: H, retention: Retention<C>) -> bool;
|
||||||
|
|
||||||
/// Returns the most recently appended leaf value.
|
/// Returns the most recently appended leaf value.
|
||||||
|
|
|
@ -52,8 +52,8 @@ witnessing and rewinding operations.
|
||||||
each return the computed root as an optional value, returning `Ok(None)` if
|
each return the computed root as an optional value, returning `Ok(None)` if
|
||||||
the checkpoint corresponding to the requested identifier does not exist.
|
the checkpoint corresponding to the requested identifier does not exist.
|
||||||
- `ShardTree::root_at_checkpoint_depth` and `root_at_checkpoint_depth_caching`
|
- `ShardTree::root_at_checkpoint_depth` and `root_at_checkpoint_depth_caching`
|
||||||
now takes the `checkpoint_depth` argument as `Option<usize>` instead of
|
now take their `checkpoint_depth` argument as `Option<usize>` instead of
|
||||||
`usize`. The semantics of this method are now changed such that if a
|
`usize`. The semantics of these methods are now changed such that if a
|
||||||
checkpoint depth is provided, it is now treated strictly as a zero-based
|
checkpoint depth is provided, it is now treated strictly as a zero-based
|
||||||
index into the checkpoints of the tree in reverse order of checkpoint
|
index into the checkpoints of the tree in reverse order of checkpoint
|
||||||
identifier, and an error is returned if no checkpoint exists at the given
|
identifier, and an error is returned if no checkpoint exists at the given
|
||||||
|
@ -70,9 +70,9 @@ witnessing and rewinding operations.
|
||||||
`Ok(None)` if no checkpoint was available at the given checkpoint depth. The
|
`Ok(None)` if no checkpoint was available at the given checkpoint depth. The
|
||||||
semantics of this method are now changed such that if a checkpoint depth is
|
semantics of this method are now changed such that if a checkpoint depth is
|
||||||
provided, it is now treated strictly as a zero-based index into the
|
provided, it is now treated strictly as a zero-based index into the
|
||||||
checkpoints of the tree in reverse order of checkpoint identifier, and an
|
checkpoints of the tree in reverse order of checkpoint identifier. IT IS NO
|
||||||
error is returned if no checkpoint exists at the given index. IT IS NO LONGER
|
LONGER POSSIBLE TO COMPUTE A WITNESS WITHOUT A CHECKPOINT BEING PRESENT IN
|
||||||
POSSIBLE TO COMPUTE A WITNESS WITHOUT A CHECKPOINT BEING PRESENT IN THE TREE.
|
THE TREE.
|
||||||
- `shardtree::store::ShardStore`:
|
- `shardtree::store::ShardStore`:
|
||||||
- The semantics of `ShardStore::get_checkpoint_at_depth` HAVE CHANGED WITHOUT
|
- The semantics of `ShardStore::get_checkpoint_at_depth` HAVE CHANGED WITHOUT
|
||||||
CHANGES TO THE METHOD SIGNATURE. The `checkpoint_depth` argument to this
|
CHANGES TO THE METHOD SIGNATURE. The `checkpoint_depth` argument to this
|
||||||
|
|
Loading…
Reference in New Issue