2
2
mirror of https://github.com/octoleo/restic.git synced 2024-05-28 14:40:49 +00:00

if cond { return true }; return false => return cond

This commit is contained in:
greatroar 2020-10-13 20:56:43 +02:00
parent 27db3ec262
commit 720e0ee0c7

View File

@ -515,11 +515,8 @@ func (idx *Index) merge(idx2 *Index) error {
// isErrOldIndex returns true if the error may be caused by an old index
// format.
func isErrOldIndex(err error) bool {
if e, ok := err.(*json.UnmarshalTypeError); ok && e.Value == "array" {
return true
}
return false
e, ok := err.(*json.UnmarshalTypeError)
return ok && e.Value == "array"
}
// DecodeIndex unserializes an index from buf.