Skip to content

Commit 57ef82b

Browse files
authored
Minor refactorings (#2482)
1 parent 95cb591 commit 57ef82b

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

modules/core/src/main/scala/org/scalasteward/core/update/FilterAlg.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ object FilterAlg {
8989
}
9090

9191
private def checkVersionOrdering(update: Update.Single): FilterResult = {
92-
val (current, next) =
93-
(coursier.core.Version(update.currentVersion), coursier.core.Version(update.nextVersion))
92+
val current = coursier.core.Version(update.currentVersion)
93+
val next = coursier.core.Version(update.nextVersion)
9494
if (current > next) Left(VersionOrderingConflict(update)) else Right(update)
9595
}
9696
}

modules/core/src/test/scala/org/scalasteward/core/buildtool/mill/MillDepParserTest.scala

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package org.scalasteward.core.buildtool.mill
22

33
import munit.FunSuite
4-
import org.scalasteward.core.data.{ArtifactId, Dependency, GroupId}
4+
import org.scalasteward.core.TestSyntax._
55

66
class MillDepParserTest extends FunSuite {
77
test("parse dependencies from https://github.com/lihaoyi/requests-scala") {
@@ -129,15 +129,11 @@ class MillDepParserTest extends FunSuite {
129129
|""".stripMargin
130130
val Right(result) = parser.parseModules(data)
131131

132-
val dep12 = List(
133-
Dependency(GroupId("com.lihaoyi"), ArtifactId("geny", Some("geny_2.12")), "0.6.0")
134-
)
132+
val dep12 = List("com.lihaoyi".g % ("geny", "geny_2.12").a % "0.6.0")
135133

136134
assertEquals(result.headOption.map(_.dependencies), Some(dep12))
137135

138-
val dep13 = List(
139-
Dependency(GroupId("com.lihaoyi"), ArtifactId("geny", Some("geny_2.13")), "0.6.0")
140-
)
136+
val dep13 = List("com.lihaoyi".g % ("geny", "geny_2.13").a % "0.6.0")
141137

142138
assertEquals(result.find(_.name == "requests[2.13.0]").map(_.dependencies), Some(dep13))
143139
}

0 commit comments

Comments
 (0)