mirror of https://github.com/sbt/sbt.git
remove unnecessary vararg splice
This commit is contained in:
parent
439e24fb84
commit
3d6286edc2
|
|
@ -64,12 +64,7 @@ object Configurations {
|
|||
private[sbt] def defaultConfiguration(mavenStyle: Boolean) =
|
||||
if (mavenStyle) Configurations.Compile else Configurations.Default
|
||||
private[sbt] def removeDuplicates(configs: Iterable[Configuration]) =
|
||||
Set(
|
||||
scala.collection.mutable
|
||||
.Map(configs.map(config => (config.name, config)).toSeq*)
|
||||
.values
|
||||
.toList*
|
||||
)
|
||||
configs.map(config => (config.name, config)).toMap.values.toSet
|
||||
|
||||
/** Returns true if the configuration should be under the influence of scalaVersion. */
|
||||
@nowarn
|
||||
|
|
|
|||
|
|
@ -437,7 +437,7 @@ class MakePom(val log: Logger) {
|
|||
configurations: Option[Iterable[Configuration]]
|
||||
): Seq[DependencyDescriptor] = {
|
||||
val keepConfigurations = IvySbt.getConfigurations(module, configurations)
|
||||
val keepSet: Set[String] = Set(keepConfigurations.toSeq*)
|
||||
val keepSet: Set[String] = keepConfigurations.toSet
|
||||
def translate(dependency: DependencyDescriptor) = {
|
||||
val keep = dependency.getModuleConfigurations
|
||||
.filter((conf: String) => keepSet.contains(conf))
|
||||
|
|
|
|||
|
|
@ -625,7 +625,7 @@ private[sbt] trait CachedResolutionResolveEngine extends ResolveEngine {
|
|||
loopLists.toList
|
||||
}
|
||||
val allModules2: mutable.Map[(String, String), Vector[OrganizationArtifactReport]] =
|
||||
mutable.Map(allModules0.toSeq*)
|
||||
allModules0.to(mutable.Map)
|
||||
@tailrec def breakLoops(loops: List[List[(String, String)]]): Unit =
|
||||
loops match {
|
||||
case Nil => ()
|
||||
|
|
|
|||
|
|
@ -205,9 +205,8 @@ class ClassStamper(
|
|||
// .get(prodClassName)
|
||||
// .map: analyzed =>
|
||||
// 0L // analyzed.??? we need a hash here
|
||||
val xs = SortedSet(
|
||||
(internalDeps union internalJarDeps union externalDeps union classDigests).toSeq*
|
||||
)
|
||||
val xs =
|
||||
(internalDeps union internalJarDeps union externalDeps union classDigests).to(SortedSet)
|
||||
if xs.nonEmpty then stamps(className) = xs
|
||||
else ()
|
||||
xs
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ object ProjectQuery:
|
|||
.examples("@scalaBinaryVersion=3")
|
||||
.?)
|
||||
.map { case (proj, params) =>
|
||||
ProjectQuery(proj, Map(params.toSeq*))
|
||||
ProjectQuery(proj, params.toMap)
|
||||
}
|
||||
.filter(
|
||||
(q) => q.projectName.contains("...") || q.params.nonEmpty,
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ final class Fork(val commandName: String, val runnerClass: Option[String]) {
|
|||
if (Fork.shouldUseArgumentsFile(options))
|
||||
new JProcessBuilder(executable, Fork.createArgumentsFile(options))
|
||||
else
|
||||
new JProcessBuilder(command.toArray*)
|
||||
new JProcessBuilder(command*)
|
||||
workingDirectory.foreach(jpb.directory(_))
|
||||
environment.foreach { case (k, v) => jpb.environment.put(k, v) }
|
||||
if (connectInput) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue