Skip to content

Commit

Permalink
Roll map(to:) back to mapTo(_:) for SharedSequenceConvertibleType
Browse files Browse the repository at this point in the history
This is for convergence with the corresponding function on `ObservableType`, which was rolled back in v3.1.0.
  • Loading branch information
SamHFrancis committed Sep 15, 2018
1 parent 176d0b9 commit 0106e72
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,7 @@ master
- Fix `withUnretained` so it allows proper destructuring
- added `mapMany` operator
- added `toSortedArray` operator
- rolled `map(to:)` back to `mapTo(_:)` for `SharedSequenceConvertibleType`

3.3.0
-----
Expand Down
5 changes: 0 additions & 5 deletions Source/RxCocoa/mapTo+RxCocoa.swift
Expand Up @@ -15,12 +15,7 @@ extension SharedSequenceConvertibleType {
- parameter value: A constant that each element of the input sequence is being replaced with
- returns: An unit containing the values `value` provided as a parameter
*/
@available(*, deprecated, renamed: "map(to:)")
public func mapTo<R>(_ value: R) -> SharedSequence<SharingStrategy, R> {
return map { _ in value }
}

public func map<R>(to value: R) -> SharedSequence<SharingStrategy, R> {
return map { _ in value }
}
}
2 changes: 1 addition & 1 deletion Tests/RxCocoa/MapToTests+RxCocoa.swift
Expand Up @@ -25,7 +25,7 @@ class MapToCocoaTests: XCTestCase {

_ = Observable.from(numbers)
.asDriver(onErrorJustReturn: nil)
.map(to: "candy")
.mapTo("candy")
.drive(observer)

scheduler.start()
Expand Down

0 comments on commit 0106e72

Please sign in to comment.