Skip to content

Commit f5489a1

Browse files
committed
simplifying mapTypesDiffer
1 parent a5f2827 commit f5489a1

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

diff/map.go

+1-7
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,7 @@ func mapTypesDiffer(lhs, rhs interface{}) (bool, error) {
8585
rhsElType := rhsVal.Type().Elem()
8686
rhsKeyType := rhsVal.Type().Key()
8787

88-
if lhsElType.Kind() != rhsElType.Kind() {
89-
return true, nil
90-
} else if lhsKeyType.Kind() != rhsKeyType.Kind() {
91-
return true, nil
92-
}
93-
94-
return false, nil
88+
return lhsElType.Kind() != rhsElType.Kind() || lhsKeyType.Kind() != rhsKeyType.Kind(), nil
9589
}
9690

9791
func (m mapDiff) Diff() Type {

0 commit comments

Comments
 (0)