@@ -206,27 +206,27 @@ extension Signal.Event: EventProtocol {
206
206
// This operator performs side effect upon interruption.
207
207
208
208
extension Signal . Event {
209
- internal typealias Transformation < U, E: Swift . Error > = ( ReactiveSwift . Observer < U , E > , Lifetime ) -> ReactiveSwift . Observer < Value , Error >
209
+ internal typealias Transformation < U, E: Swift . Error > = ( any ReactiveSwift . Observer < U , E > , Lifetime ) -> ( any ReactiveSwift . Observer < Value , Error > )
210
210
211
- internal static func filter( _ isIncluded: @escaping ( Value ) -> Bool ) -> Transformation < Value , Error > {
211
+ internal static func filter( _ isIncluded: @escaping @ Sendable ( Value ) -> Bool ) -> Transformation < Value , Error > {
212
212
return { downstream, _ in
213
213
Operators . Filter ( downstream: downstream, predicate: isIncluded)
214
214
}
215
215
}
216
216
217
- internal static func compactMap< U> ( _ transform: @escaping ( Value ) -> U ? ) -> Transformation < U , Error > {
217
+ internal static func compactMap< U> ( _ transform: @escaping @ Sendable ( Value ) -> U ? ) -> Transformation < U , Error > {
218
218
return { downstream, _ in
219
219
Operators . CompactMap ( downstream: downstream, transform: transform)
220
220
}
221
221
}
222
222
223
- internal static func map< U> ( _ transform: @escaping ( Value ) -> U ) -> Transformation < U , Error > {
223
+ internal static func map< U> ( _ transform: @escaping @ Sendable ( Value ) -> U ) -> Transformation < U , Error > {
224
224
return { downstream, _ in
225
225
Operators . Map ( downstream: downstream, transform: transform)
226
226
}
227
227
}
228
228
229
- internal static func mapError< E> ( _ transform: @escaping ( Error ) -> E ) -> Transformation < Value , E > {
229
+ internal static func mapError< E> ( _ transform: @escaping @ Sendable ( Error ) -> E ) -> Transformation < Value , E > {
230
230
return { downstream, _ in
231
231
Operators . MapError ( downstream: downstream, transform: transform)
232
232
}
@@ -244,13 +244,13 @@ extension Signal.Event {
244
244
}
245
245
}
246
246
247
- internal static func attemptMap< U> ( _ transform: @escaping ( Value ) -> Result < U , Error > ) -> Transformation < U , Error > {
247
+ internal static func attemptMap< U> ( _ transform: @escaping @ Sendable ( Value ) -> Result < U , Error > ) -> Transformation < U , Error > {
248
248
return { downstream, _ in
249
249
Operators . AttemptMap ( downstream: downstream, transform: transform)
250
250
}
251
251
}
252
252
253
- internal static func attempt( _ action: @escaping ( Value ) -> Result < ( ) , Error > ) -> Transformation < Value , Error > {
253
+ internal static func attempt( _ action: @escaping @ Sendable ( Value ) -> Result < ( ) , Error > ) -> Transformation < Value , Error > {
254
254
return attemptMap { value -> Result < Value , Error > in
255
255
return action ( value) . map { _ in value }
256
256
}
@@ -285,13 +285,13 @@ extension Signal.Event {
285
285
}
286
286
}
287
287
288
- internal static func take( while shouldContinue: @escaping ( Value ) -> Bool ) -> Transformation < Value , Error > {
288
+ internal static func take( while shouldContinue: @escaping @ Sendable ( Value ) -> Bool ) -> Transformation < Value , Error > {
289
289
return { downstream, _ in
290
290
Operators . TakeWhile ( downstream: downstream, shouldContinue: shouldContinue)
291
291
}
292
292
}
293
293
294
- internal static func take( until shouldContinue: @escaping ( Value ) -> Bool ) -> Transformation < Value , Error > {
294
+ internal static func take( until shouldContinue: @escaping @ Sendable ( Value ) -> Bool ) -> Transformation < Value , Error > {
295
295
return { downstream, _ in
296
296
Operators . TakeUntil ( downstream: downstream, shouldContinue: shouldContinue)
297
297
}
@@ -397,7 +397,7 @@ extension Signal.Event {
397
397
return scan ( into: initialResult) { $0 = nextPartialResult ( $0, $1) }
398
398
}
399
399
400
- internal static func scanMap< State, U> ( into initialState: State , _ next: @escaping ( inout State , Value ) -> U ) -> Transformation < U , Error > {
400
+ internal static func scanMap< State, U> ( into initialState: State , _ next: @escaping @ Sendable ( inout State , Value ) -> U ) -> Transformation < U , Error > {
401
401
return { downstream, _ in
402
402
Operators . ScanMap ( downstream: downstream, initial: initialState, next: next)
403
403
}
0 commit comments