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 61552a9 commit 10bcb55Copy full SHA for 10bcb55
ObjectMapper/Core/FromJSON.swift
@@ -53,9 +53,7 @@ internal final class FromJSON {
53
/// Array of Raw representable
54
class func rawRepresentableArray<N: RawRepresentable>(inout field: [N], object: [N.RawValue]?) {
55
if let values = object {
56
- field = values.reduce([N]()) { (var vs, v) in
57
- vs.append(N(rawValue: v)!)
58
- return vs
+ field = values.map { (v: N.RawValue) in N(rawValue: v)! }
59
}
60
61
0 commit comments