@@ -463,7 +463,7 @@ public class Task<Progress, Value, Error>: Cancellable, CustomStringConvertible
463463
464464 ///
465465 /// success (fulfilled) + closure returning nothing
466- /// used as transpalent (i.e. it doesn't affect passed Task) handler.
466+ /// used as transparent (i.e. it doesn't affect passed Task) handler.
467467 ///
468468 /// - e.g. task.success { value -> Void in ... }
469469 ///
@@ -476,6 +476,7 @@ public class Task<Progress, Value, Error>: Cancellable, CustomStringConvertible
476476 public func success< C: Canceller > ( inout canceller: C ? , _ successClosure: Value -> Void ) -> Task
477477 {
478478 return self . success ( & canceller) { ( value: Value ) -> Task in
479+ successClosure ( value)
479480 return Task ( value: value)
480481 }
481482 }
@@ -531,7 +532,7 @@ public class Task<Progress, Value, Error>: Cancellable, CustomStringConvertible
531532
532533 ///
533534 /// failure (rejected or cancelled) + closure returning nothing
534- /// used as transpalent (i.e. it doesn't affect passed Task) handler.
535+ /// used as transparent (i.e. it doesn't affect passed Task) handler.
535536 ///
536537 /// - e.g. task.failure { errorInfo -> Void in ... }
537538 /// - e.g. task.failure { error, isCancelled -> Void in ... }
@@ -546,6 +547,7 @@ public class Task<Progress, Value, Error>: Cancellable, CustomStringConvertible
546547 public func failure< C: Canceller > ( inout canceller: C ? , _ failureClosure: ErrorInfo -> Void ) -> Task
547548 {
548549 return self . failure ( & canceller) { ( errorInfo: ErrorInfo ) -> Task in
550+ failureClosure ( errorInfo)
549551 return Task ( errorInfo: errorInfo)
550552 }
551553 }
0 commit comments