remove copy-paste

This commit is contained in:
Ivan Smolin 2018-04-11 16:24:17 +03:00
parent e51a585ed9
commit b320615154
1 changed files with 1 additions and 8 deletions

View File

@ -78,14 +78,7 @@ public extension TextFieldViewModel {
/// - Parameter closure: Closure that takes a view events parameter and returns Disposable.
/// - Returns: Disposable object that can be used to unsubscribe the observer from the binding.
func mapViewEvents(_ closure: @escaping MapViewEventClosure) -> Disposable {
return viewEventsDriver
.map { [weak self] in
guard let strongSelf = self else {
return
}
closure($0).disposed(by: strongSelf.disposeBag)
}
.drive()
return mapViewEvents { [closure($0)] }
}
typealias MapViewEventsClosure = (ViewEvents) -> [Disposable]