mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-26 07:13:24 +03:00
Reformat
This commit is contained in:
parent
31b756453b
commit
bd37492b81
@ -16,14 +16,16 @@ extension ObservableType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension PrimitiveSequenceType where TraitType == CompletableTrait, ElementType == Never {
|
extension PrimitiveSequenceType
|
||||||
|
where TraitType == CompletableTrait, ElementType == Never {
|
||||||
|
|
||||||
func andThen(using body: () -> Completable) -> Completable {
|
func andThen(using body: () -> Completable) -> Completable {
|
||||||
return self.andThen(body())
|
return self.andThen(body())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension PrimitiveSequence where Element == Never, TraitType == CompletableTrait {
|
extension PrimitiveSequence
|
||||||
|
where Element == Never, TraitType == CompletableTrait {
|
||||||
|
|
||||||
func wait() throws {
|
func wait() throws {
|
||||||
var trigger = false
|
var trigger = false
|
||||||
@ -56,11 +58,18 @@ extension PrimitiveSequence where Element == Never, TraitType == CompletableTrai
|
|||||||
|
|
||||||
extension PrimitiveSequence where TraitType == SingleTrait {
|
extension PrimitiveSequence where TraitType == SingleTrait {
|
||||||
|
|
||||||
static func fromSinglesToSingleOfArray(_ singles: [Single<Element>]) -> Single<[Element]> {
|
static func fromSinglesToSingleOfArray(
|
||||||
return Observable.merge(singles.map { $0.asObservable() }).toArray().asSingle()
|
_ singles: [Single<Element>]
|
||||||
|
) -> Single<[Element]> {
|
||||||
|
return Observable
|
||||||
|
.merge(singles.map { $0.asObservable() })
|
||||||
|
.toArray()
|
||||||
|
.asSingle()
|
||||||
}
|
}
|
||||||
|
|
||||||
func flatMapCompletable(_ selector: @escaping (Element) throws -> Completable) -> Completable {
|
func flatMapCompletable(
|
||||||
|
_ selector: @escaping (Element) throws -> Completable
|
||||||
|
) -> Completable {
|
||||||
return self
|
return self
|
||||||
.asObservable()
|
.asObservable()
|
||||||
.flatMap { try selector($0).asObservable() }
|
.flatMap { try selector($0).asObservable() }
|
||||||
|
Loading…
Reference in New Issue
Block a user