File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Pod::Spec.new do |s|
55
66 s . name = 'RaAPIWrapper'
77
8- s . version = '0.8.1 '
8+ s . version = '0.8.2 '
99
1010 s . summary = 'Wrappers for requesting api.'
1111
Original file line number Diff line number Diff line change @@ -23,14 +23,25 @@ extension APIParameter where Self: Encodable {
2323
2424extension Array : APIParameter {
2525 public var toParameters : Encodable {
26- ( self as [ Any ? ] ) . lazy. compactMap { $0 as? Encodable } . map { AnyEncodable ( $0) }
26+ ( self as [ Any ? ] )
27+ . lazy
28+ . compactMap {
29+ if let value = $0 as? APIParameter { return value. toParameters }
30+ return $0 as? Encodable
31+ }
32+ . map { AnyEncodable ( $0) }
2733 }
2834}
2935
3036// MARK: - Dictionary
3137
3238extension Dictionary : APIParameter where Key == String {
3339 public var toParameters : Encodable {
34- ( self as [ String : Any ? ] ) . compactMapValues { $0 as? Encodable } . mapValues { AnyEncodable ( $0) }
40+ ( self as [ String : Any ? ] )
41+ . compactMapValues {
42+ if let value = $0 as? APIParameter { return value. toParameters }
43+ return $0 as? Encodable
44+ }
45+ . mapValues { AnyEncodable ( $0) }
3546 }
3647}
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ extension API: Hashable {
8989 return ObjectIdentifier ( lhs) == ObjectIdentifier ( rhs)
9090 }
9191
92- open func hash( into hasher: inout Hasher ) {
92+ public func hash( into hasher: inout Hasher ) {
9393 hasher. combine ( ObjectIdentifier ( self ) )
9494 }
9595}
You can’t perform that action at this time.
0 commit comments