From 6caad10840abb6442e8a023acadedea8c1510c96 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Sun, 23 Mar 2025 10:11:43 +0000 Subject: [PATCH] Remove extra brackets. --- cmd/restic/global.go | 2 +- internal/repository/prune.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/restic/global.go b/cmd/restic/global.go index 22b09390c..4d2ea75d5 100644 --- a/cmd/restic/global.go +++ b/cmd/restic/global.go @@ -302,7 +302,7 @@ func resolvePassword(opts *GlobalOptions, envStr string) (string, error) { if err != nil { return "", err } - return (strings.TrimSpace(string(output))), nil + return strings.TrimSpace(string(output)), nil } if opts.PasswordFile != "" { return loadPasswordFromFile(opts.PasswordFile) diff --git a/internal/repository/prune.go b/internal/repository/prune.go index e22dd4c20..9726a6032 100644 --- a/internal/repository/prune.go +++ b/internal/repository/prune.go @@ -276,7 +276,7 @@ func packInfoFromIndex(ctx context.Context, idx restic.ListBlobser, usedBlobs *i ip := indexPack[blob.PackID] size := uint64(blob.Length) switch { - case ip.usedBlobs > 0, (ip.duplicateBlobs == ip.unusedBlobs), count == 0: + case ip.usedBlobs > 0, ip.duplicateBlobs == ip.unusedBlobs, count == 0: // other used blobs in pack, only duplicate blobs or "last" occurrence -> transition to used // a pack file created by an interrupted prune run will consist of only duplicate blobs // thus select such already repacked pack files