diff options
Diffstat (limited to 'lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go')
-rw-r--r-- | lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go b/lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go index bdaa0c4..8c43dad 100644 --- a/lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go +++ b/lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go @@ -5,21 +5,11 @@ package rebuildnodes import ( - "fmt" - "golang.org/x/exp/constraints" "git.lukeshu.com/btrfs-progs-ng/lib/btrfsprogs/btrfsinspect" ) -func maybeSet[K, V comparable](name string, m map[K]V, k K, v V) error { - if other, conflict := m[k]; conflict && other != v { - return fmt.Errorf("conflict: %s %v can't have both %v and %v", name, k, other, v) - } - m[k] = v - return nil -} - func countNodes(nodeScanResults btrfsinspect.ScanDevicesResult) int { var cnt int for _, devResults := range nodeScanResults { |