diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-07-13 20:36:27 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-07-13 20:36:27 -0600 |
commit | 4e29bb393ec774f0a79c70d9d69c54fe4e8ecb72 (patch) | |
tree | 3382a06206d00b27a756a9376e11de1126febd1b /lib/btrfsprogs/btrfsutil | |
parent | 09cc146211148a3b2568261c41a804a802c31d4c (diff) |
Move lib/rbtree to lib/containers
Diffstat (limited to 'lib/btrfsprogs/btrfsutil')
-rw-r--r-- | lib/btrfsprogs/btrfsutil/broken_btree.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/btrfsprogs/btrfsutil/broken_btree.go b/lib/btrfsprogs/btrfsutil/broken_btree.go index 2835b35..d2dc81c 100644 --- a/lib/btrfsprogs/btrfsutil/broken_btree.go +++ b/lib/btrfsprogs/btrfsutil/broken_btree.go @@ -14,7 +14,7 @@ import ( "git.lukeshu.com/btrfs-progs-ng/lib/btrfs" "git.lukeshu.com/btrfs-progs-ng/lib/btrfs/btrfsvol" - "git.lukeshu.com/btrfs-progs-ng/lib/rbtree" + "git.lukeshu.com/btrfs-progs-ng/lib/containers" "git.lukeshu.com/btrfs-progs-ng/lib/util" ) @@ -24,7 +24,7 @@ type indexItem struct { } type cachedIndex struct { - Index *rbtree.Tree[btrfs.Key, indexItem] + Index *containers.RBTree[btrfs.Key, indexItem] Err error } @@ -67,7 +67,7 @@ func NewBrokenTrees(ctx context.Context, inner *btrfs.FS) btrfs.Trees { } } -func (bt *brokenTrees) treeIndex(treeID btrfs.ObjID) (*rbtree.Tree[btrfs.Key, indexItem], error) { +func (bt *brokenTrees) treeIndex(treeID btrfs.ObjID) (*containers.RBTree[btrfs.Key, indexItem], error) { var treeRoot *btrfs.TreeRoot var err error if treeID == btrfs.ROOT_TREE_OBJECTID { @@ -92,7 +92,7 @@ func (bt *brokenTrees) treeIndex(treeID btrfs.ObjID) (*rbtree.Tree[btrfs.Key, in if err != nil { cacheEntry.Err = err } else { - cacheEntry.Index = &rbtree.Tree[btrfs.Key, indexItem]{ + cacheEntry.Index = &containers.RBTree[btrfs.Key, indexItem]{ KeyFn: func(item indexItem) btrfs.Key { return item.Key }, @@ -196,7 +196,7 @@ func (bt *brokenTrees) TreeWalk(ctx context.Context, treeID btrfs.ObjID, errHand return } var node *util.Ref[btrfsvol.LogicalAddr, btrfs.Node] - _ = index.Walk(func(indexItem *rbtree.Node[indexItem]) error { + _ = index.Walk(func(indexItem *containers.RBNode[indexItem]) error { if ctx.Err() != nil { return ctx.Err() } |