diff options
author | Simon Ochsenreither <simon@ochsenreither.de> | 2015-10-25 23:20:04 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2015-12-18 10:31:49 +0100 |
commit | 92affd3e76d1a3019f1c35ac20af32360d914641 (patch) | |
tree | 296270bf7271c1085a94d71e2d4bfa5789b3bfca /src/library/scala/collection/immutable/List.scala | |
parent | 1873db3fb78ba777c009bce11564466de875257a (diff) | |
download | scala-92affd3e76d1a3019f1c35ac20af32360d914641.tar.gz scala-92affd3e76d1a3019f1c35ac20af32360d914641.tar.bz2 scala-92affd3e76d1a3019f1c35ac20af32360d914641.zip |
Remove unused imports and other minor cleanups
- Language imports are preceding other imports
- Deleted empty file: InlineErasure
- Removed some unused private[parallel] methods in
scala/collection/parallel/package.scala
This removes hundreds of warnings when compiling with
"-Xlint -Ywarn-dead-code -Ywarn-unused -Ywarn-unused-import".
Diffstat (limited to 'src/library/scala/collection/immutable/List.scala')
-rw-r--r-- | src/library/scala/collection/immutable/List.scala | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/library/scala/collection/immutable/List.scala b/src/library/scala/collection/immutable/List.scala index 3ad567375c..c09328cae6 100644 --- a/src/library/scala/collection/immutable/List.scala +++ b/src/library/scala/collection/immutable/List.scala @@ -89,8 +89,6 @@ sealed abstract class List[+A] extends AbstractSeq[A] with scala.Serializable { override def companion: GenericCompanion[List] = List - import scala.collection.{Iterable, Traversable, Seq, IndexedSeq} - def isEmpty: Boolean def head: A def tail: List[A] @@ -265,7 +263,7 @@ sealed abstract class List[+A] extends AbstractSeq[A] } (b.toList, these) } - + final override def map[B, That](f: A => B)(implicit bf: CanBuildFrom[List[A], B, That]): That = { if (bf eq List.ReusableCBF) { if (this eq Nil) Nil.asInstanceOf[That] else { @@ -283,7 +281,7 @@ sealed abstract class List[+A] extends AbstractSeq[A] } else super.map(f) } - + final override def collect[B, That](pf: PartialFunction[A, B])(implicit bf: CanBuildFrom[List[A], B, That]): That = { if (bf eq List.ReusableCBF) { if (this eq Nil) Nil.asInstanceOf[That] else { @@ -312,7 +310,7 @@ sealed abstract class List[+A] extends AbstractSeq[A] } else super.collect(pf) } - + final override def flatMap[B, That](f: A => GenTraversableOnce[B])(implicit bf: CanBuildFrom[List[A], B, That]): That = { if (bf eq List.ReusableCBF) { if (this eq Nil) Nil.asInstanceOf[That] else { @@ -452,7 +450,7 @@ object List extends SeqFactory[List] { override def empty[A]: List[A] = Nil override def apply[A](xs: A*): List[A] = xs.toList - + private[collection] val partialNotApplied = new Function1[Any, Any] { def apply(x: Any): Any = this } @SerialVersionUID(1L) |