Skip to content

Commit 3d5b360

Browse files
committed
fixup! chore: docs inline
1 parent fc84b8f commit 3d5b360

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

hamt.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ type Node struct {
8282
//
8383
// There are between 1 and 2^bitWidth of these Pointers in any HAMT node.
8484
//
85-
// A Pointer contains either a KV bucket of `bucketSize` (3) values or a link
86-
// (CID) to a child node. When a KV bucket overflows beyond `bucketSize`, the
87-
// bucket is replaced with a link to a newly created HAMT node which will
85+
// A Pointer contains either a KV bucket of up to `bucketSize` (3) values or a
86+
// link (CID) to a child node. When a KV bucket overflows beyond `bucketSize`,
87+
// the bucket is replaced with a link to a newly created HAMT node which will
8888
// contain the `bucketSize+1` elements in its own Pointers array.
8989
//
9090
// (Note: the `refmt` tags are ignored by cbor-gen which will generate an
@@ -119,7 +119,7 @@ type Pointer struct {
119119
// `bucketSize` KV elements, where each KV contains a key and value pair
120120
// stored by the user.
121121
//
122-
// Keys are represented as bytes
122+
// Keys are represented as bytes.
123123
//
124124
// The IPLD Schema representation of this data structure is as follows:
125125
//
@@ -290,8 +290,6 @@ func (n *Node) getValue(ctx context.Context, hv *hashBits, k string, cb func(*KV
290290
if string(kv.Key) == k {
291291
return cb(kv)
292292
}
293-
// TODO: getting here would indicate a malformed HAMT, return error of some
294-
// kind
295293
}
296294

297295
return ErrNotFound

0 commit comments

Comments
 (0)