Set PartialFunction[T,Unit] as onResult callback, closing ticket #1077
This commit is contained in:
parent
4fac3aa3ad
commit
a589238f9c
1 changed files with 1 additions and 1 deletions
|
|
@ -419,7 +419,7 @@ sealed trait Future[+T] {
|
|||
* }
|
||||
* </pre>
|
||||
*/
|
||||
final def onResult(pf: PartialFunction[Any, Unit]): this.type = onComplete { f ⇒
|
||||
final def onResult(pf: PartialFunction[T, Unit]): this.type = onComplete { f ⇒
|
||||
val optr = f.result
|
||||
if (optr.isDefined) {
|
||||
val r = optr.get
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue