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.
2 parents 3695f69 + 44b0e4f commit ea84883Copy full SHA for ea84883
stdlib/public/core/Map.swift
@@ -26,11 +26,7 @@ public struct LazyMapGenerator<
26
/// since the copy was made, and no preceding call to `self.next()`
27
/// has returned `nil`.
28
public mutating func next() -> Element? {
29
- let x = _base.next()
30
- if x != nil {
31
- return _transform(x!)
32
- }
33
- return nil
+ return _base.next().map(_transform)
34
}
35
36
public var base: Base { return _base }
0 commit comments