Skip to content

Commit

Permalink
Merge pull request #284 from scalameta/update/scalafmt-core-3.8.4-RC4
Browse files Browse the repository at this point in the history
Update scalafmt-core to 3.8.4-RC4
  • Loading branch information
tgodzik authored Dec 30, 2024
2 parents 3ae45b8 + 561632f commit 0120365
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# scalafmt changes
b128c8a617dfc391b17e0c6422bc07bf4ad9356b

# Scala Steward: Reformat with scalafmt 3.8.4-RC4
4d04349e2de81bd5f4823e5283961bf07ca3b69e
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=3.8.4-RC3
version=3.8.4-RC4
assumeStandardLibraryStripMargin = true

align.preset = none
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ object HoconPrinter {
case Conf.Obj(obj) =>
val flattened = obj.map { case (k, v) => (k, flatten(v)) }
val next = flattened.flatMap {
case (key, Conf.Obj(nested)) => nested
.map { case (k, v) => s"${quote(key)}.$k" -> v }
case (key, Conf.Obj(nested)) => nested.map { case (k, v) =>
s"${quote(key)}.$k" -> v
}
case (key, value) => (quote(key), value) :: Nil
}
Conf.Obj(next)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ object TPrintLowPri {
object RefinedType {
def unapply(tpe: TypeRepr): Option[(TypeRepr, List[(String, TypeRepr)])] =
tpe match {
case Refinement(p, i, b) => unapply(p)
.map { case (pp, bs) => (pp, (i -> b) :: bs) }
.orElse(Some((p, (i -> b) :: Nil)))
case Refinement(p, i, b) => unapply(p).map { case (pp, bs) =>
(pp, (i -> b) :: bs)
}.orElse(Some((p, (i -> b) :: Nil)))
case _ => None
}
}
Expand Down

0 comments on commit 0120365

Please sign in to comment.