diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-01-01 22:19:15 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-01-01 22:42:08 -0700 |
commit | a683b7a67ffdfd20836f1421ad269ef13c9355ac (patch) | |
tree | 0afd205455c58b74a213cf85d28be67601cea930 /lib/btrfs/btrfssum/shortsum.go | |
parent | cbdb7d1b3f14666ef44574b73bce07b80bf8d480 (diff) |
lint: Turn on unconvert
Diffstat (limited to 'lib/btrfs/btrfssum/shortsum.go')
-rw-r--r-- | lib/btrfs/btrfssum/shortsum.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/btrfs/btrfssum/shortsum.go b/lib/btrfs/btrfssum/shortsum.go index aaf7a89..c3d6f8b 100644 --- a/lib/btrfs/btrfssum/shortsum.go +++ b/lib/btrfs/btrfssum/shortsum.go @@ -131,7 +131,7 @@ func (run SumRun[Addr]) Get(sumIdx int64) (ShortSum, error) { return "", io.EOF } off := int(sumIdx) * run.ChecksumSize - return ShortSum(run.Sums[off : off+run.ChecksumSize]), nil + return run.Sums[off : off+run.ChecksumSize], nil } func (run SumRun[Addr]) SumForAddr(addr Addr) (ShortSum, bool) { @@ -139,7 +139,7 @@ func (run SumRun[Addr]) SumForAddr(addr Addr) (ShortSum, bool) { return "", false } off := int((addr-run.Addr)/BlockSize) * run.ChecksumSize - return ShortSum(run.Sums[off : off+run.ChecksumSize]), true + return run.Sums[off : off+run.ChecksumSize], true } func (run SumRun[Addr]) Walk(ctx context.Context, fn func(Addr, ShortSum) error) error { @@ -147,7 +147,7 @@ func (run SumRun[Addr]) Walk(ctx context.Context, fn func(Addr, ShortSum) error) if err := ctx.Err(); err != nil { return err } - if err := fn(addr, ShortSum(run.Sums[off:off+run.ChecksumSize])); err != nil { + if err := fn(addr, run.Sums[off:off+run.ChecksumSize]); err != nil { return err } } @@ -208,7 +208,7 @@ func (sg SumRunWithGaps[Addr]) SumForAddr(addr Addr) (ShortSum, error) { continue } off := int((addr-run.Addr)/BlockSize) * run.ChecksumSize - return ShortSum(run.Sums[off : off+run.ChecksumSize]), nil + return run.Sums[off : off+run.ChecksumSize], nil } return "", diskio.ErrWildcard } |