Cleanup FlattenCursor

This commit is contained in:
Gwendal Roué committed 2016-11-29 08:41:13 +01:00
1 parent 5b0b674988
commit 2e73199153
1 file changed
+2 -4
+2 -4
View File
@@ -132,10 +132,8 @@ public final class FlattenCursor<Base: Cursor> : Cursor where Base.Element: Curs
/// TODO
public func next() throws -> Base.Element.Element? {
while true {
if let inner = inner {
if let element = try inner.next() {
return element
}
if let element = try inner?.next() {
return element
}
guard let inner = try base.next() else {
return nil