2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 10:58:55 +00:00

Remove redundant if ...; err != nil; return pattern

This commit is contained in:
Michael Eischer 2023-05-18 18:07:19 +02:00
parent 6ed73ed408
commit 319087c056
3 changed files with 3 additions and 14 deletions

View File

@ -63,11 +63,7 @@ directories in an encrypted repository stored on different backends.
// run the debug functions for all subcommands (if build tag "debug" is
// enabled)
if err := runDebug(); err != nil {
return err
}
return nil
return runDebug()
},
}

View File

@ -306,10 +306,7 @@ func (be *b2Backend) List(ctx context.Context, t restic.FileType, fn func(restic
return err
}
}
if err := iter.Err(); err != nil {
return err
}
return nil
return iter.Err()
}
// Delete removes all restic keys in the bucket. It will not remove the bucket itself.

View File

@ -605,11 +605,7 @@ func (node *Node) fillExtra(path string, fi os.FileInfo) error {
return errors.Errorf("invalid node type %q", node.Type)
}
if err := node.fillExtendedAttributes(path); err != nil {
return err
}
return nil
return node.fillExtendedAttributes(path)
}
func (node *Node) fillExtendedAttributes(path string) error {