We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34c0a5d commit a775bceCopy full SHA for a775bce
1 file changed
Sources/RequestInfo/APIParameter.swift
@@ -13,11 +13,17 @@ public protocol APIParameter {
13
var toParameters: Encodable { get }
14
}
15
16
+// MARK: - Default
17
+
18
+extension APIParameter where Self: Encodable {
19
+ public var toParameters: Encodable { self }
20
+}
21
22
// MARK: - Array
23
24
extension Array: APIParameter {
25
public var toParameters: Encodable {
- lazy.compactMap { $0 as? Encodable }.map { AnyEncodable($0) }
26
+ (self as [Any?]).lazy.compactMap { $0 as? Encodable }.map { AnyEncodable($0) }
27
28
29
0 commit comments