Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit a8cf38e

Browse files
committed
fix erroneous TODO context in switchToBasic
1 parent 5a0232e commit a8cf38e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

io/directory.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ func (d *BasicDirectory) EnumLinksAsync(ctx context.Context) <-chan format.LinkR
244244
}
245245

246246
// ForEachLink implements the `Directory` interface.
247-
func (d *BasicDirectory) ForEachLink(ctx context.Context, f func(*ipld.Link) error) error {
247+
func (d *BasicDirectory) ForEachLink(_ context.Context, f func(*ipld.Link) error) error {
248248
for _, l := range d.node.Links() {
249249
if err := f(l); err != nil {
250250
return err
@@ -408,7 +408,7 @@ func (d *HAMTDirectory) switchToBasic(ctx context.Context) (*BasicDirectory, err
408408
basicDir := newEmptyBasicDirectory(d.dserv)
409409
basicDir.SetCidBuilder(d.GetCidBuilder())
410410

411-
d.ForEachLink(context.TODO(), func(lnk *ipld.Link) error {
411+
d.ForEachLink(ctx, func(lnk *ipld.Link) error {
412412
err := basicDir.addLinkChild(ctx, lnk.Name, lnk)
413413
if err != nil {
414414
return err

0 commit comments

Comments
 (0)