Skip to content

Commit

Permalink
replace deprecated Traversable and TraversableOnce
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Oct 3, 2024
1 parent 5534ab4 commit e7a7682
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions internal/zinc-apiinfo/src/main/scala/xsbt/api/HashAPI.scala
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ final class HashAPI private (
i += 1
}
}
final def hashSymmetric[T](ts: TraversableOnce[T], hashF: T => Unit): Unit = {
final def hashSymmetric[T](ts: IterableOnce[T], hashF: T => Unit): Unit = {
val current = hash
val tsHash: Hash = ts match {
case ts: collection.Iterable[T] =>
Expand Down Expand Up @@ -218,7 +218,7 @@ final class HashAPI private (
*
* NOTE: This method doesn't perform any filtering of passed definitions.
*/
def hashDefinitionsWithExtraHash(ds: TraversableOnce[Definition], extraHash: Hash): Unit = {
def hashDefinitionsWithExtraHash(ds: IterableOnce[Definition], extraHash: Hash): Unit = {
def hashDefinitionCombined(d: Definition): Unit = {
hashDefinition(d)
extend(extraHash)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ trait Compilations extends ReadCompilations {
object Compilations {
val empty: Compilations = new MCompilations(Seq.empty)
def of(s: Seq[Compilation]): Compilations = new MCompilations(s)
def merge(s: Traversable[Compilations]): Compilations =
def merge(s: Iterable[Compilations]): Compilations =
of((s flatMap { _.allCompilations }).toSeq.distinct)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ object SourceInfos {
): SourceInfo =
new UnderlyingSourceInfo(reported, unreported, mainClasses)

def merge(infos: Traversable[SourceInfos]): SourceInfos =
def merge(infos: Iterable[SourceInfos]): SourceInfos =
infos.foldLeft(SourceInfos.empty)(_ ++ _)

def merge1(info1: SourceInfo, info2: SourceInfo) = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ object Stamps {
): Stamps =
new MStamps(products, sources, libraries)

def merge(stamps: Traversable[Stamps]): Stamps = stamps.foldLeft(Stamps.empty)(_ ++ _)
def merge(stamps: Iterable[Stamps]): Stamps = stamps.foldLeft(Stamps.empty)(_ ++ _)
}

private class MStamps(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ trait FormatCommons {

protected def readMappedPairs[K, V](
in: BufferedReader
)(expectedHeader: String, s2k: String => K, s2v: (K, String) => V): Traversable[(K, V)] = {
)(expectedHeader: String, s2k: String => K, s2v: (K, String) => V): Iterable[(K, V)] = {
def toPair(s: String): (K, V) = {
if (s == null) throw new EOFException
val p = s.indexOf(" -> ")
Expand Down

0 comments on commit e7a7682

Please sign in to comment.