refactor: update to RxSwift 6

This commit is contained in:
Vlad 2021-01-23 21:53:08 +03:00
parent c5403c0ba9
commit d264b23089
2 changed files with 8 additions and 4 deletions

View File

@ -55,7 +55,7 @@ public extension Sequence {
return Observable.from(indexedRanges)
.flatMap { indexedRange -> Observable<(idx: Int, results: [R])> in
Observable.just(indexedRange)
.observeOn(scheduler)
.observe(on: scheduler)
.map { (idx: $0.idx, results: try array[$0.range].map(transform)) }
}
.toArray()

View File

@ -138,9 +138,13 @@ public extension UIColor {
getRed(&red, green: &green, blue: &blue, alpha: &alpha)
let intRepresentation = alpha == 1
? Int(red * 255) << 16 | Int(green * 255) << 8 | Int(blue * 255) << 0
: Int(red * 255) << 24 | Int(green * 255) << 16 | Int(blue * 255) << 8 | Int(alpha * 255) << 0
let intRepresentation: Int
if alpha == 1 {
intRepresentation = Int(red * 255) << 16 | Int(green * 255) << 8 | Int(blue * 255)
} else {
intRepresentation = Int(red * 255) << 24 | Int(green * 255) << 16 | Int(blue * 255) << 8 | Int(alpha * 255)
}
return String(intRepresentation, radix: 16)
}