diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-31 18:01:47 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-04-04 14:08:38 -0600 |
commit | c1578391cc2089cd224fd8325c333038e0ba7b7b (patch) | |
tree | eb003ba90cb0f8b1863167dec670b4ef0f80f29a /lib/btrfsutil/graph.go | |
parent | 1ba83231195ea3b78ce545f4518f70c74819345b (diff) |
maps: Add HasKey and HaveAnyKeysInCommon functions, use them
Diffstat (limited to 'lib/btrfsutil/graph.go')
-rw-r--r-- | lib/btrfsutil/graph.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/btrfsutil/graph.go b/lib/btrfsutil/graph.go index 7863e0d..db036d8 100644 --- a/lib/btrfsutil/graph.go +++ b/lib/btrfsutil/graph.go @@ -226,7 +226,7 @@ func (g Graph) FinalCheck(ctx context.Context, fs btrfstree.NodeSource) error { stats.D = len(g.EdgesTo) progressWriter.Set(stats) for laddr := range g.EdgesTo { - if _, ok := g.Nodes[laddr]; !ok { + if !maps.HasKey(g.Nodes, laddr) { node, err := fs.AcquireNode(ctx, laddr, btrfstree.NodeExpectations{ LAddr: containers.OptionalValue(laddr), }) |