diff options
author | Christoph Neijenhuis <whateverhuis@gmail.com> | 2015-05-15 10:17:28 +0200 |
---|---|---|
committer | Christoph Neijenhuis <whateverhuis@gmail.com> | 2015-05-15 10:17:28 +0200 |
commit | d504017f15692ae72db05118ed2be38daa3b7752 (patch) | |
tree | 545fead6b0e3c246d12ecf76765b867cc80c3a25 /src/library/scala/util/Try.scala | |
parent | 4b0e3bc38a6fe58dbcf43fbe1d21ee8467f7326c (diff) | |
download | scala-d504017f15692ae72db05118ed2be38daa3b7752.tar.gz scala-d504017f15692ae72db05118ed2be38daa3b7752.tar.bz2 scala-d504017f15692ae72db05118ed2be38daa3b7752.zip |
Fixed deprecation warning in scaladoc example of Try
Diffstat (limited to 'src/library/scala/util/Try.scala')
-rw-r--r-- | src/library/scala/util/Try.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/library/scala/util/Try.scala b/src/library/scala/util/Try.scala index f65c77f5a0..0a6a7972c2 100644 --- a/src/library/scala/util/Try.scala +++ b/src/library/scala/util/Try.scala @@ -24,11 +24,12 @@ import scala.language.implicitConversions * * Example: * {{{ + * import scala.io.StdIn * import scala.util.{Try, Success, Failure} * * def divide: Try[Int] = { - * val dividend = Try(Console.readLine("Enter an Int that you'd like to divide:\n").toInt) - * val divisor = Try(Console.readLine("Enter an Int that you'd like to divide by:\n").toInt) + * val dividend = Try(StdIn.readLine("Enter an Int that you'd like to divide:\n").toInt) + * val divisor = Try(StdIn.readLine("Enter an Int that you'd like to divide by:\n").toInt) * val problem = dividend.flatMap(x => divisor.map(y => x/y)) * problem match { * case Success(v) => |