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
1 changed files with 2 additions and 5 deletions

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.