Skip to content

Commit

Permalink
simplifying mapTypesDiffer
Browse files Browse the repository at this point in the history
  • Loading branch information
yazgazan committed Aug 20, 2019
1 parent a5f2827 commit f5489a1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions diff/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,7 @@ func mapTypesDiffer(lhs, rhs interface{}) (bool, error) {
rhsElType := rhsVal.Type().Elem()
rhsKeyType := rhsVal.Type().Key()

if lhsElType.Kind() != rhsElType.Kind() {
return true, nil
} else if lhsKeyType.Kind() != rhsKeyType.Kind() {
return true, nil
}

return false, nil
return lhsElType.Kind() != rhsElType.Kind() || lhsKeyType.Kind() != rhsKeyType.Kind(), nil
}

func (m mapDiff) Diff() Type {
Expand Down

0 comments on commit f5489a1

Please # to comment.