mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
This commit is contained in:
@@ -97,9 +97,8 @@ public struct EnumerateGenerator<
|
||||
///
|
||||
/// - Requires: No preceding call to `self.next()` has returned `nil`.
|
||||
public mutating func next() -> Element? {
|
||||
let b = base.next()
|
||||
if b == nil { return .None }
|
||||
return .Some((index: count++, element: b!))
|
||||
guard let b = base.next() else { return .None }
|
||||
return .Some((index: count++, element: b))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user