File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
apollo-ios/Sources/ApolloAPI Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ public extension SelectionSet {
22
22
}
23
23
24
24
@inlinable
25
- internal static func equatableCheck< T : Hashable > (
26
- _ lhs: [ T : any Hashable ] ,
27
- _ rhs: [ T : any Hashable ]
25
+ internal static func equatableCheck(
26
+ _ lhs: [ String : any Hashable ] ,
27
+ _ rhs: [ String : any Hashable ]
28
28
) -> Bool {
29
29
guard lhs. keys == rhs. keys else { return false }
30
30
@@ -37,18 +37,18 @@ public extension SelectionSet {
37
37
}
38
38
}
39
39
40
+ @_disfavoredOverload
40
41
@inlinable
41
42
internal static func equatableCheck< T: Hashable > (
42
43
_ lhs: T ,
43
44
_ rhs: any Hashable
44
45
) -> Bool {
45
- if lhs != rhs as? T {
46
- print ( """
47
- equatableCheck failure on \( String ( describing: self ) )
48
- T: \( String ( describing: T . self) )
49
- lhs: \( lhs)
50
- rhs: \( rhs) , as? T: \( rhs as? T )
51
- """ )
46
+ if let lhs = lhs as? [ any Hashable ] ,
47
+ let rhs = rhs as? [ any Hashable ] {
48
+
49
+ return lhs. elementsEqual ( rhs) { l, r in
50
+ equatableCheck ( l, r)
51
+ }
52
52
}
53
53
54
54
return lhs == rhs as? T
@@ -61,7 +61,6 @@ public extension SelectionSet {
61
61
62
62
} else {
63
63
self . addFulfilledSelections ( of: type ( of: self ) , to: & fields)
64
-
65
64
}
66
65
67
66
return fields
You can’t perform that action at this time.
0 commit comments