Skip to content

Commit

Permalink
Roll map(to:) back to mapTo(_:) for `SharedSequenceConvertibleTyp…
Browse files Browse the repository at this point in the history
…e` (#179)
  • Loading branch information
freak4pc committed Sep 16, 2018
2 parents 176d0b9 + 4cb00a0 commit 75e9bcf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 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
4 changes: 2 additions & 2 deletions Source/RxCocoa/mapTo+RxCocoa.swift
Expand Up @@ -15,11 +15,11 @@ 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 }
}


@available(*, deprecated, renamed: "mapTo(_:)")
public func map<R>(to value: R) -> SharedSequence<SharingStrategy, R> {
return map { _ in value }
}
Expand Down
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 75e9bcf

Please sign in to comment.