Skip to content

Commit cb05b2a

Browse files
committed
fix(MappableExtensionsTests): Add an else statement to avoid running both hasher.combine(_) lines
1 parent cd08306 commit cb05b2a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Tests/ObjectMapperTests/MappableExtensionsTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ struct TestMappable: Mappable, Equatable, Hashable {
4949
func hash(into hasher: inout Hasher) {
5050
if let value = value {
5151
hasher.combine(value)
52+
} else {
53+
hasher.combine(NSIntegerMax)
5254
}
53-
hasher.combine(NSIntegerMax)
5455
}
5556
}
5657

0 commit comments

Comments
 (0)