Skip to content

Commit

Permalink
Remove conditional lazy conformance from Chain2
Browse files Browse the repository at this point in the history
  • Loading branch information
natecook1000 committed Oct 23, 2020
1 parent 268452f commit 4c89606
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
3 changes: 1 addition & 2 deletions Guides/Chain.md
Expand Up @@ -31,8 +31,7 @@ public func chain<S1, S2>(_ s1: S1, _ s2: S2) -> Chain2<S1, S2>

The resulting `Chain2` type is a sequence, with conditional conformance to
`Collection`, `BidirectionalCollection`, and `RandomAccessCollection` when both
the first and second arguments conform. `Chain2` also conforms to
`LazySequenceProtocol` when the first argument conforms.
the first and second arguments conform.

### Naming

Expand Down
1 change: 0 additions & 1 deletion Sources/Algorithms/Chain.swift
Expand Up @@ -272,7 +272,6 @@ extension Chain2: BidirectionalCollection

extension Chain2: RandomAccessCollection
where Base1: RandomAccessCollection, Base2: RandomAccessCollection {}
extension Chain2: LazySequenceProtocol where Base1: LazySequenceProtocol {}

extension Chain2: Equatable where Base1: Equatable, Base2: Equatable {}
extension Chain2: Hashable where Base1: Hashable, Base2: Hashable {}
Expand Down
4 changes: 0 additions & 4 deletions Tests/SwiftAlgorithmsTests/ChainTests.swift
Expand Up @@ -136,8 +136,4 @@ final class ChainTests: XCTestCase {
XCTAssertEqual(c.distance(from: start, to: end), distance)
}
}

func testChainLazy() {
XCTAssertLazy(chain([1, 2, 3].lazy, [4, 5, 6]))
}
}

0 comments on commit 4c89606

Please sign in to comment.