Skip to content

Commit fa3ba5a

Browse files
committed
Merge pull request scala#5083 from xuwei-k/fix-Future-scaladoc
use Future#foreach instead of onSuccess in example code
2 parents a46af82 + 76fd5a2 commit fa3ba5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/library/scala/concurrent/Future.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import scala.reflect.ClassTag
2929
* val f: Future[String] = Future {
3030
* s + " future!"
3131
* }
32-
* f onSuccess {
33-
* case msg => println(msg)
32+
* f foreach {
33+
* msg => println(msg)
3434
* }
3535
* }}}
3636
*

0 commit comments

Comments
 (0)