Skip to content

Commit b90b81d

Browse files
Roberto Tyleyrtyley
authored andcommitted
Support Scala 3
1 parent b33f74c commit b90b81d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

build.sbt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
import ReleaseTransformations._
2+
import Dependencies._
23

34
lazy val baseSettings = Seq(
45
scalaVersion := "2.13.10",
5-
crossScalaVersions := Seq(scalaVersion.value),
6+
crossScalaVersions := Seq(scalaVersion.value, "3.2.1"),
67
organization := "com.madgag.scala-git",
78
scmInfo := Some(ScmInfo(
89
url("https://github.com/rtyley/scala-git"),
910
"scm:git:[email protected]:rtyley/scala-git.git"
1011
)),
1112
licenses := Seq("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
12-
scalacOptions ++= Seq("-deprecation", "-unchecked")
13+
scalacOptions ++= Seq("-deprecation", "-unchecked"),
14+
libraryDependencies ++= Seq(madgagCompress % Test, scalatest % Test)
1315
)
1416

1517
lazy val `scala-git` = project.settings(baseSettings: _*).dependsOn(`scala-git-test` % Test)

scala-git/src/main/scala/com/madgag/diff/MapDiff.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.madgag.diff
22

3-
import com.madgag.scala.collection.decorators.MapDecorator
3+
import com.madgag.scala.collection.decorators._
44

55
object MapDiff {
66
def apply[K,V](before: Map[K,V], after: Map[K,V]): MapDiff[K,V] =
@@ -12,7 +12,7 @@ case class MapDiff[K, V](beforeAndAfter: Map[BeforeAndAfter, Map[K,V]]) {
1212
lazy val commonElements: Set[K] = beforeAndAfter.values.map(_.keySet).reduce(_ intersect _)
1313

1414
lazy val only: Map[BeforeAndAfter, Map[K,V]] =
15-
beforeAndAfter.mapV(_.view.filterKeys(!commonElements(_)).toMap)
15+
beforeAndAfter.mapV(_.view.filterKeys(!commonElements(_)).toMap).toMap
1616

1717
lazy val (unchanged, changed) =
1818
commonElements.partition(k => beforeAndAfter(Before)(k) == beforeAndAfter(After)(k))

0 commit comments

Comments
 (0)