Formatting Future.scala
This commit is contained in:
parent
f22f229619
commit
4c7d9cbc1e
1 changed files with 1 additions and 1 deletions
|
|
@ -458,7 +458,7 @@ sealed trait Future[+T] extends japi.Future[T] with Await.Awaitable[T] {
|
|||
val future = Promise[A]()
|
||||
onComplete {
|
||||
case l: Left[_, _] ⇒ future complete l.asInstanceOf[Either[Throwable, A]]
|
||||
case Right(res) ⇒ future complete (try { Right(f(res)) } catch { case e: Exception ⇒ Left(e) } )
|
||||
case Right(res) ⇒ future complete (try { Right(f(res)) } catch { case e: Exception ⇒ Left(e) })
|
||||
}
|
||||
future
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue