Move post-nil guarantee to separate line for Iterators' next()

This commit is contained in:
Patrick Pijnappel
2016-05-08 21:36:39 +02:00
parent ab9e74cba3
commit 4419614be4
14 changed files with 51 additions and 21 deletions

View File

@@ -85,7 +85,9 @@ public struct EnumeratedIterator<
public typealias Element = (offset: Int, element: Base.Element)
/// Advances to the next element and returns it, or `nil` if no next element
/// exists. Once `nil` has been returned, all subsequent calls return `nil`.
/// exists.
///
/// Once `nil` has been returned, all subsequent calls return `nil`.
public mutating func next() -> Element? {
guard let b = _base.next() else { return nil }
defer { _count += 1 }