Skip to content

Commit

Permalink
Remove concrete same-type requirements for Swift3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hagmas authored and kzaher committed Jun 15, 2017
1 parent 1a8e7f4 commit 1e2cbf6
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions RxSwift/Traits/PrimitiveSequence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -627,20 +627,6 @@ extension PrimitiveSequenceType where TraitType == MaybeTrait {
}
}

extension PrimitiveSequence where Trait == CompletableTrait, Element == Never {
/**
Concatenates the second observable sequence to `self` upon successful termination of `self`.

- seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html)

- parameter second: Second observable sequence.
- returns: An observable sequence that contains the elements of `self`, followed by those of the second sequence.
*/
public func concat(_ second: PrimitiveSequence<CompletableTrait, Never>) -> PrimitiveSequence<CompletableTrait, Never> {
return Completable.concat(self, second)
}
}

extension PrimitiveSequenceType where TraitType == CompletableTrait, ElementType == Never {
/**
Returns an empty observable sequence, using the specified scheduler to send out the single `Completed` message.
Expand All @@ -653,6 +639,18 @@ extension PrimitiveSequenceType where TraitType == CompletableTrait, ElementType
return PrimitiveSequence(raw: Observable.empty())
}

/**
Concatenates the second observable sequence to `self` upon successful termination of `self`.

- seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html)

- parameter second: Second observable sequence.
- returns: An observable sequence that contains the elements of `self`, followed by those of the second sequence.
*/
public func concat(_ second: PrimitiveSequence<CompletableTrait, Never>) -> PrimitiveSequence<CompletableTrait, Never> {
return Completable.concat(primitiveSequence, second)
}

/**
Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully.

Expand Down

0 comments on commit 1e2cbf6

Please sign in to comment.