Skip to content

Commit 471013e

Browse files
Fixed documentation comment and indentation
1 parent 0ba2278 commit 471013e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

stdlib/public/core/Mirror.swift

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -910,23 +910,25 @@ extension DictionaryLiteral : Equatable where Key: Equatable, Value : Equatable
910910
public static func ==(lhs: DictionaryLiteral<Key, Value>, rhs: DictionaryLiteral<Key, Value>) -> Bool {
911911
let lhsCount = lhs.count
912912
if lhsCount != rhs.count {
913-
return false
913+
return false
914914
}
915+
916+
return lhs.elementsEqual(rhs)
915917
// We know that lhs.count == rhs.count, compare element wise.
916918
for idx in 0..<lhsCount {
917-
if lhs[idx].key != rhs[idx].key ||
918-
lhs[idx].value != rhs[idx].value {
919-
return false
920-
}
919+
if lhs[idx].key != rhs[idx].key ||
920+
lhs[idx].value != rhs[idx].value {
921+
return false
922+
}
921923
}
922924
return true
923925
}
924926
}
925927

926928
extension DictionaryLiteral : Hashable where Key: Hashable, Value : Hashable {
927-
/// The hash value for the dictionary.
929+
/// The hash value for the collection.
928930
///
929-
/// Two dictionaries that are equal will always have equal hash values.
931+
/// Two `DictionaryLiteral` values that are equal will always have equal hash values.
930932
///
931933
/// Hash values are not guaranteed to be equal across different executions of
932934
/// your program. Do not save hash values to use during a future execution.

0 commit comments

Comments
 (0)