1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-30 00:00:14 +01:00

Remove unnecessary type conversions, second set.

This commit is contained in:
Martin Smith 2025-02-28 19:39:47 +00:00
parent 092899df8b
commit 29b4680873
3 changed files with 9 additions and 9 deletions

View file

@ -104,7 +104,7 @@ func runRepairSnapshots(ctx context.Context, gopts GlobalOptions, opts RepairOpt
} }
ok := true ok := true
var newContent restic.IDs = restic.IDs{} var newContent = restic.IDs{}
var newSize uint64 var newSize uint64
// check all contents and remove if not available // check all contents and remove if not available
for _, id := range node.Content { for _, id := range node.Content {

View file

@ -18,7 +18,7 @@ import (
// UnlockCancelDelay bounds the duration how long lock cleanup operations will wait // UnlockCancelDelay bounds the duration how long lock cleanup operations will wait
// if the passed in context was canceled. // if the passed in context was canceled.
const UnlockCancelDelay time.Duration = 1 * time.Minute const UnlockCancelDelay = 1 * time.Minute
// Lock represents a process locking the repository for an operation. // Lock represents a process locking the repository for an operation.
// //

View file

@ -71,19 +71,19 @@ type FileType = backend.FileType
// in the `WriteableFileType` subset can be modified via the Repository interface. // in the `WriteableFileType` subset can be modified via the Repository interface.
// All other filetypes are considered internal datastructures of the Repository. // All other filetypes are considered internal datastructures of the Repository.
const ( const (
PackFile FileType = backend.PackFile PackFile = backend.PackFile
KeyFile FileType = backend.KeyFile KeyFile = backend.KeyFile
LockFile FileType = backend.LockFile LockFile = backend.LockFile
SnapshotFile FileType = backend.SnapshotFile SnapshotFile = backend.SnapshotFile
IndexFile FileType = backend.IndexFile IndexFile = backend.IndexFile
ConfigFile FileType = backend.ConfigFile ConfigFile = backend.ConfigFile
) )
// WriteableFileType defines the different data types that can be modified via SaveUnpacked or RemoveUnpacked. // WriteableFileType defines the different data types that can be modified via SaveUnpacked or RemoveUnpacked.
type WriteableFileType backend.FileType type WriteableFileType backend.FileType
const ( const (
WriteableSnapshotFile WriteableFileType = WriteableFileType(SnapshotFile) WriteableSnapshotFile = WriteableFileType(SnapshotFile)
) )
func (w *WriteableFileType) ToFileType() FileType { func (w *WriteableFileType) ToFileType() FileType {