diff --git a/Sources/Extensions/Sequence/Sequence+ConcurrentMap.swift b/Sources/Extensions/Sequence/Sequence+ConcurrentMap.swift index 71843141..773990f2 100644 --- a/Sources/Extensions/Sequence/Sequence+ConcurrentMap.swift +++ b/Sources/Extensions/Sequence/Sequence+ConcurrentMap.swift @@ -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() diff --git a/Sources/Extensions/UIColor/UIColor+Hex.swift b/Sources/Extensions/UIColor/UIColor+Hex.swift index 42eea8b8..e313578c 100644 --- a/Sources/Extensions/UIColor/UIColor+Hex.swift +++ b/Sources/Extensions/UIColor/UIColor+Hex.swift @@ -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) }