=htc,htp Small fix in scaladoc, add FIXME reminder

This commit is contained in:
Mathias 2015-03-02 11:32:23 +01:00
parent 91a0dbe036
commit ef34319987
2 changed files with 5 additions and 4 deletions

View file

@ -26,8 +26,9 @@ class FastFuture[A](val future: Future[A]) extends AnyVal {
transformWith(f, FastFuture.failed)
def filter(pred: A Boolean)(implicit executor: ExecutionContext): Future[A] =
flatMap {
r if (pred(r)) future else throw new NoSuchElementException("Future.filter predicate is not satisfied")
flatMap { r
if (pred(r)) future
else throw new NoSuchElementException("Future.filter predicate is not satisfied") // FIXME: avoid stack trace generation
}
def foreach(f: A Unit)(implicit ec: ExecutionContext): Unit = map(f)