forked from TrueCloudLab/restic
if cond { return true }; return false => return cond
This commit is contained in:
parent
27db3ec262
commit
720e0ee0c7
1 changed files with 2 additions and 5 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue