Skip to content

Commit

Permalink
Replace 'Generator' with 'Iterator'
Browse files Browse the repository at this point in the history
In the latest Swift 3.1 snapshots Argo ceases to build with: `error:
'Generator' has been renamed to 'Iterator'`.

I think this is safe for all of Swift 3.x though.
  • Loading branch information
RLovelett authored and gfontenot committed Jan 20, 2017
1 parent c7af578 commit 6bd9a52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Argo/Types/StandardTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ public extension Collection where Iterator.Element: Decodable, Iterator.Element

- returns: A decoded array of values
*/
static func decode(_ json: JSON) -> Decoded<[Generator.Element]> {
static func decode(_ json: JSON) -> Decoded<[Iterator.Element]> {
switch json {
case let .array(a): return sequence(a.map(Generator.Element.decode))
case let .array(a): return sequence(a.map(Iterator.Element.decode))
default: return .typeMismatch(expected: "Array", actual: json)
}
}
Expand Down

0 comments on commit 6bd9a52

Please sign in to comment.