Skip to content

Commit

Permalink
[split] Future.followedBy->Future.before
Browse files Browse the repository at this point in the history
RB_ID=263637
  • Loading branch information
mariusae authored and CI committed Jan 8, 2014
1 parent ff61ba5 commit 2d8f0de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion util-core/src/main/scala/com/twitter/util/Future.scala
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ abstract class Future[+A] extends Awaitable[A] {
* discards the result of `this`. Note that this applies only
* `Unit`-valued Futures -- i.e. side-effects..
*/
def followedBy[B](f: => Future[B])(implicit ev: this.type <:< Future[Unit]): Future[B] =
def before[B](f: => Future[B])(implicit ev: this.type <:< Future[Unit]): Future[B] =
transform({
case Return(_) => f
case Throw(t) => Future.rawException(t)
Expand Down
2 changes: 1 addition & 1 deletion util-core/src/test/scala/com/twitter/util/FutureTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ class FutureTest extends WordSpec {
}

testSequence("flatMap", (a, next) => a flatMap { _ => next() })
testSequence("followedBy", (a, next) => a followedBy next())
testSequence("before", (a, next) => a before next())

"flatMap (values)" should {
val f = Future(1) flatMap { x => Future(x + 1) }
Expand Down

0 comments on commit 2d8f0de

Please sign in to comment.