diff --git a/Source/RxSwift/ObservableType+ObjectMapper.swift b/Source/RxSwift/ObservableType+ObjectMapper.swift index 61a16375..00d8900f 100644 --- a/Source/RxSwift/ObservableType+ObjectMapper.swift +++ b/Source/RxSwift/ObservableType+ObjectMapper.swift @@ -31,26 +31,3 @@ public extension ObservableType where E == Response { } } } - - -// MARK: - ImmutableMappable -public extension ObservableType where E == Response { - - /// Maps data received from the signal into an object - /// which implements the ImmutableMappable protocol and returns the result back - /// If the conversion fails, the signal errors. - public func mapObject(_ type: T.Type, context: MapContext? = nil) -> Observable { - return flatMap { response -> Observable in - return Observable.just(try response.mapObject(T.self, context: context)) - } - } - - /// Maps data received from the signal into an array of objects - /// which implement the ImmutableMappable protocol and returns the result back - /// If the conversion fails, the signal errors. - public func mapArray(_ type: T.Type, context: MapContext? = nil) -> Observable<[T]> { - return flatMap { response -> Observable<[T]> in - return Observable.just(try response.mapArray(T.self, context: context)) - } - } -} diff --git a/Source/RxSwift/Single+ObjectMapper.swift b/Source/RxSwift/Single+ObjectMapper.swift index fae867cd..09a6f4ec 100755 --- a/Source/RxSwift/Single+ObjectMapper.swift +++ b/Source/RxSwift/Single+ObjectMapper.swift @@ -31,26 +31,3 @@ public extension PrimitiveSequence where TraitType == SingleTrait, ElementType = } } } - - -// MARK: - ImmutableMappable -public extension PrimitiveSequence where TraitType == SingleTrait, ElementType == Response { - - /// Maps data received from the signal into an object - /// which implements the ImmutableMappable protocol and returns the result back - /// If the conversion fails, the signal errors. - public func mapObject(_ type: T.Type, context: MapContext? = nil) -> Single { - return flatMap { response -> Single in - return Single.just(try response.mapObject(type, context: context)) - } - } - - /// Maps data received from the signal into an array of objects - /// which implement the ImmutableMappable protocol and returns the result back - /// If the conversion fails, the signal errors. - public func mapArray(_ type: T.Type, context: MapContext? = nil) -> Single<[T]> { - return flatMap { response -> Single<[T]> in - return Single.just(try response.mapArray(type, context: context)) - } - } -}