diff options
author | soc <simon@ochsenreither.de> | 2016-04-04 22:07:55 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2016-04-04 22:07:55 +0200 |
commit | d8aa2cdfb83de35cc0e427f26530195ccff46d51 (patch) | |
tree | b5eef2fc5066961b4cfa9b672c8e2212d38e7d50 /src/library/scala/collection/parallel/mutable/ParTrieMap.scala | |
parent | 3c466670d2526f4a1ff77e005fbc5b32cc31f52f (diff) | |
download | scala-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/collection/parallel/mutable/ParTrieMap.scala')
-rw-r--r-- | src/library/scala/collection/parallel/mutable/ParTrieMap.scala | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/library/scala/collection/parallel/mutable/ParTrieMap.scala b/src/library/scala/collection/parallel/mutable/ParTrieMap.scala index a1dc37cec9..2faf223b99 100644 --- a/src/library/scala/collection/parallel/mutable/ParTrieMap.scala +++ b/src/library/scala/collection/parallel/mutable/ParTrieMap.scala @@ -152,18 +152,9 @@ extends TrieMapIterator[K, V](lev, ct, mustInit) /** Only used within the `ParTrieMap`. */ private[mutable] trait ParTrieMapCombiner[K, V] extends Combiner[(K, V), ParTrieMap[K, V]] { - def combine[N <: (K, V), NewTo >: ParTrieMap[K, V]](other: Combiner[N, NewTo]): Combiner[N, NewTo] = if (this eq other) this else { - throw new UnsupportedOperationException("This shouldn't have been called in the first place.") - - val thiz = this.asInstanceOf[ParTrieMap[K, V]] - val that = other.asInstanceOf[ParTrieMap[K, V]] - val result = new ParTrieMap[K, V] - - result ++= thiz.iterator - result ++= that.iterator - - result - } + def combine[N <: (K, V), NewTo >: ParTrieMap[K, V]](other: Combiner[N, NewTo]): Combiner[N, NewTo] = + if (this eq other) this + else throw new UnsupportedOperationException("This shouldn't have been called in the first place.") override def canBeShared = true } |