doc: update comments regarding buckets

This commit is contained in:
Joonas Koivunen 2020-08-14 10:30:32 +03:00
parent e129973e03
commit d2ea05f64a
2 changed files with 4 additions and 3 deletions

View File

@ -67,8 +67,9 @@ fn walk(blocks: ShardedBlockStore, start: &Cid) -> Result<(), Error> {
blocks.as_file(&next.to_bytes())?.read_to_end(&mut buf)?;
match walker.next(&buf, &mut cache)? {
// Continuation of a HAMT shard directory that is usually ignored
ContinuedWalk::Bucket(..) => {}
ContinuedWalk::Bucket(..) => {
// Continuation of a HAMT shard directory that is usually ignored
}
ContinuedWalk::File(segment, _, path, metadata, size) => {
if segment.is_first() {
// this is set on the root block, no actual bytes are present for multiblock

View File

@ -548,7 +548,7 @@ impl fmt::Debug for InnerEntry {
/// Representation of the walk progress.
#[derive(Debug)]
pub enum ContinuedWalk<'a> {
/// Currently looking at a bucket.
/// Currently looking at a continuation of a HAMT sharded directory. Usually safe to ignore.
Bucket(&'a Cid, &'a Path),
/// Currently looking at a directory.
Directory(&'a Cid, &'a Path, &'a Metadata),