We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d079068 commit 44b0e4fCopy full SHA for 44b0e4f
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