summaryrefslogtreecommitdiff
path: root/src/library/scala/concurrent
diff options
context:
space:
mode:
authorsoc <simon@ochsenreither.de>2016-04-04 22:07:55 +0200
committerLukas Rytz <lukas.rytz@typesafe.com>2016-04-04 22:07:55 +0200
commitd8aa2cdfb83de35cc0e427f26530195ccff46d51 (patch)
treeb5eef2fc5066961b4cfa9b672c8e2212d38e7d50 /src/library/scala/concurrent
parent3c466670d2526f4a1ff77e005fbc5b32cc31f52f (diff)
downloadscala-d8aa2cdfb83de35cc0e427f26530195ccff46d51.tar.gz
scala-d8aa2cdfb83de35cc0e427f26530195ccff46d51.tar.bz2
scala-d8aa2cdfb83de35cc0e427f26530195ccff46d51.zip
General cleanups and less warnings during a Scala build
Diffstat (limited to 'src/library/scala/concurrent')
-rw-r--r--src/library/scala/concurrent/duration/Duration.scala8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/library/scala/concurrent/duration/Duration.scala b/src/library/scala/concurrent/duration/Duration.scala
index a905ef345c..f69030bd3d 100644
--- a/src/library/scala/concurrent/duration/Duration.scala
+++ b/src/library/scala/concurrent/duration/Duration.scala
@@ -9,8 +9,6 @@
package scala.concurrent.duration
import java.lang.{ Double => JDouble, Long => JLong }
-import scala.language.implicitConversions
-import scala.language.postfixOps
object Duration {
@@ -57,7 +55,7 @@ object Duration {
case "Inf" | "PlusInf" | "+Inf" => Inf
case "MinusInf" | "-Inf" => MinusInf
case _ =>
- val unitName = s1.reverse takeWhile (_.isLetter) reverse;
+ val unitName = s1.reverse.takeWhile(_.isLetter).reverse;
timeUnit get unitName match {
case Some(unit) =>
val valueStr = s1 dropRight unitName.length
@@ -87,11 +85,11 @@ object Duration {
// TimeUnit => standard label
protected[duration] val timeUnitName: Map[TimeUnit, String] =
- timeUnitLabels.toMap mapValues (s => words(s).last) toMap
+ timeUnitLabels.toMap.mapValues(s => words(s).last).toMap
// Label => TimeUnit
protected[duration] val timeUnit: Map[String, TimeUnit] =
- timeUnitLabels flatMap { case (unit, names) => expandLabels(names) map (_ -> unit) } toMap
+ timeUnitLabels.flatMap{ case (unit, names) => expandLabels(names) map (_ -> unit) }.toMap
/**
* Extract length and time unit out of a string, where the format must match the description for [[Duration$.apply(s:String)* apply(String)]].