Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stdlib] Switch Zip2Sequence.init to be internal #20148

Merged
merged 1 commit into from Oct 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions stdlib/public/core/Zip.swift
Expand Up @@ -45,7 +45,7 @@
public func zip<Sequence1, Sequence2>(
_ sequence1: Sequence1, _ sequence2: Sequence2
) -> Zip2Sequence<Sequence1, Sequence2> {
return Zip2Sequence(_sequence1: sequence1, _sequence2: sequence2)
return Zip2Sequence(sequence1, sequence2)
}

/// A sequence of pairs built out of two underlying sequences.
Expand Down Expand Up @@ -77,8 +77,7 @@ public struct Zip2Sequence<Sequence1 : Sequence, Sequence2 : Sequence> {
/// Creates an instance that makes pairs of elements from `sequence1` and
/// `sequence2`.
@inlinable // generic-performance
public // @testable
init(_sequence1 sequence1: Sequence1, _sequence2 sequence2: Sequence2) {
internal init(_ sequence1: Sequence1, _ sequence2: Sequence2) {
(_sequence1, _sequence2) = (sequence1, sequence2)
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/Interpreter/protocol_extensions.swift
Expand Up @@ -65,7 +65,7 @@ extension Sequence {

extension Sequence {
public func myZip<S : Sequence>(_ s: S) -> Zip2Sequence<Self, S> {
return Zip2Sequence(_sequence1: self, _sequence2: s)
return zip(self, s)
}
}

Expand Down
Expand Up @@ -7,6 +7,7 @@
Constructor AnyHashable.init(_box:) has been removed
Constructor AnyHashable.init(_usingDefaultRepresentationOf:) has been removed
Constructor ManagedBufferPointer.init(_:_:_:) has been removed
Constructor Zip2Sequence.init(_sequence1:_sequence2:) has been removed
Constructor _BridgeableMetatype.init(value:) has been removed
Func AnyHashable._downCastConditional(into:) has been removed
Func _CocoaDictionary.Index.copy() has been removed
Expand Down