diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-03 11:32:52 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-12 16:16:53 -0700 |
commit | 677755c799c1b6b942349c7d9de836335c7bbf55 (patch) | |
tree | 9709e8bb3040d3afa31388b448077a04523a979f /lib/btrfs/csums.go | |
parent | 81e8155ff1c16dbf70206fbf239f99cf37c49432 (diff) |
btrfsitem: Have all Item implementations be pointers to structs
Diffstat (limited to 'lib/btrfs/csums.go')
-rw-r--r-- | lib/btrfs/csums.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/btrfs/csums.go b/lib/btrfs/csums.go index a32f090..2bfa588 100644 --- a/lib/btrfs/csums.go +++ b/lib/btrfs/csums.go @@ -60,9 +60,9 @@ func LookupCSum(fs btrfstree.TreeOperator, alg btrfssum.CSumType, laddr btrfsvol return btrfssum.SumRun[btrfsvol.LogicalAddr]{}, fmt.Errorf("item type is %v, not EXTENT_CSUM", item.Key.ItemType) } switch body := item.Body.(type) { - case btrfsitem.ExtentCSum: + case *btrfsitem.ExtentCSum: return body.SumRun, nil - case btrfsitem.Error: + case *btrfsitem.Error: return btrfssum.SumRun[btrfsvol.LogicalAddr]{}, body.Err default: panic(fmt.Errorf("should not happen: EXTENT_CSUM has unexpected item type: %T", body)) |