Skip to content

Commit 0d71d05

Browse files
authored
Merge pull request #4784 from typelevel/update/scalafmt-core-3.9.10
Update scalafmt-core to 3.9.10
2 parents 70405e5 + 85a528b commit 0d71d05

File tree

30 files changed

+56
-53
lines changed

30 files changed

+56
-53
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ b4d207e9fa9f1463f0827fe20101e7901fecf820
2121

2222
# Fix errors under Scala 3.6.3
2323
fab4479a6b2975e5243565671a3a33a24469662d
24+
25+
# Scala Steward: Reformat with scalafmt 3.9.10
26+
cdc7d21b5cca65d410b89d480b3ccf19594946c1

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=3.9.4
1+
version=3.9.10
22
align.openParenCallSite = true
33
align.openParenDefnSite = true
44
maxColumn = 120

alleycats-core/src/main/scala/alleycats/std/iterable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ trait IterableInstances {
9797

9898
private def toImIndexedSeq[A](fa: Iterable[A]): ImIndexedSeq[A] = fa match {
9999
case iseq: ImIndexedSeq[A] => iseq
100-
case _ =>
100+
case _ =>
101101
val as = collection.mutable.ArrayBuffer[A]()
102102
as ++= fa
103103
wrapMutableIndexedSeq(as)

core/src/main/scala-2.12/cats/data/ChainCompanionCompat.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ private[data] trait ChainCompanionCompat {
5858
xs match {
5959
case s: immutable.Seq[A] => fromImmutableSeq(s) // pay O(1) not O(N) cost
6060
case s: Seq[A] => fromMutableSeq(s)
61-
case notSeq =>
61+
case notSeq =>
6262
fromImmutableSeq(notSeq.toVector) // toSeq could return a Stream, creating potential race conditions
6363
}
6464
}

core/src/main/scala-2.13+/cats/instances/arraySeq.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private[cats] object ArraySeqInstances {
113113
override def traverseVoid[G[_], A, B](fa: ArraySeq[A])(f: A => G[B])(implicit G: Applicative[G]): G[Unit] =
114114
G match {
115115
case x: StackSafeMonad[G] => Traverse.traverseVoidDirectly(fa)(f)(x)
116-
case _ =>
116+
case _ =>
117117
foldRight(fa, Eval.now(G.unit)) { (a, acc) =>
118118
G.map2Eval(f(a), acc) { (_, _) =>
119119
()

core/src/main/scala/cats/Eval.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ object Eval extends EvalInstances {
313313
def value: A =
314314
result match {
315315
case Some(a) => a
316-
case None =>
316+
case None =>
317317
val a = evaluate(this)
318318
result = Some(a)
319319
a

core/src/main/scala/cats/TraverseFilter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ trait TraverseFilter[F[_]] extends FunctorFilter[F] {
146146
State { (distinct: IntMap[List[A]]) =>
147147
val ahash = H.hash(a)
148148
distinct.get(ahash) match {
149-
case None => (distinct.updated(ahash, a :: Nil), Some(a))
149+
case None => (distinct.updated(ahash, a :: Nil), Some(a))
150150
case Some(existing) =>
151151
if (Traverse[List].contains_(existing, a))
152152
(distinct, None)

core/src/main/scala/cats/data/AndThen.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ sealed abstract class AndThen[-T, +R] extends (T => R) with Product with Seriali
110110
// technique implemented for `cats.effect.IO#map`
111111
g match {
112112
case atg: AndThen[A, T] => AndThen.andThen(atg, this)
113-
case _ =>
113+
case _ =>
114114
this match {
115115
case Single(f, index) if index < fusionMaxStackDepth =>
116116
Single(f.compose(g), index + 1)

core/src/main/scala/cats/data/Chain.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ sealed abstract class Chain[+A] extends ChainCompat[A] {
600600
*/
601601
final def zipWithIndex: Chain[(A, Int)] =
602602
this match {
603-
case Singleton(a) => Singleton((a, 0))
603+
case Singleton(a) => Singleton((a, 0))
604604
case a @ Append(_, _) =>
605605
Wrap(a.iterator.zipWithIndex.toVector)
606606
case Wrap(seq) => Wrap(seq.zipWithIndex)
@@ -724,7 +724,7 @@ sealed abstract class Chain[+A] extends ChainCompat[A] {
724724
@annotation.tailrec
725725
def loop[B <: A](h: Chain.NonEmpty[B], tail: List[Chain.NonEmpty[B]], acc: Chain[A]): Chain[A] =
726726
h match {
727-
case Append(l, r) => loop(l, r :: tail, acc)
727+
case Append(l, r) => loop(l, r :: tail, acc)
728728
case sing @ Singleton(_) =>
729729
val nextAcc = sing.concat(acc)
730730
tail match {
@@ -1450,7 +1450,7 @@ sealed abstract private[data] class ChainInstances extends ChainInstances1 {
14501450
override def traverseVoid[G[_], A, B](fa: Chain[A])(f: A => G[B])(implicit G: Applicative[G]): G[Unit] =
14511451
G match {
14521452
case x: StackSafeMonad[G] => Traverse.traverseVoidDirectly(fa.iterator)(f)(x)
1453-
case _ =>
1453+
case _ =>
14541454
@tailrec
14551455
def go(fa: NonEmpty[A], rhs: Chain[A], acc: G[Unit]): G[Unit] =
14561456
fa match {
@@ -1460,21 +1460,21 @@ sealed abstract private[data] class ChainInstances extends ChainInstances1 {
14601460
val va = Foldable[collection.immutable.Seq].traverseVoid(as)(f)
14611461
val acc1 = G.productL(acc)(va)
14621462
rhs match {
1463-
case Empty => acc1
1463+
case Empty => acc1
14641464
case ne: NonEmpty[A] =>
14651465
go(ne, Empty, acc1)
14661466
}
14671467
case Singleton(a) =>
14681468
val acc1 = G.productL(acc)(f(a))
14691469
rhs match {
1470-
case Empty => acc1
1470+
case Empty => acc1
14711471
case ne: NonEmpty[A] =>
14721472
go(ne, Empty, acc1)
14731473
}
14741474
}
14751475

14761476
fa match {
1477-
case Empty => G.unit
1477+
case Empty => G.unit
14781478
case ne: NonEmpty[A] =>
14791479
go(ne, Empty, G.unit)
14801480
}

core/src/main/scala/cats/data/Ior.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -802,11 +802,11 @@ sealed abstract class Ior[+A, +B] extends Product with Serializable {
802802

803803
final def compare[AA >: A, BB >: B](that: AA Ior BB)(implicit AA: Order[AA], BB: Order[BB]): Int =
804804
(this, that) match {
805-
case (Ior.Left(a1), Ior.Left(a2)) => AA.compare(a1, a2)
806-
case (Ior.Left(_), _) => -1
807-
case (Ior.Right(b1), Ior.Right(b2)) => BB.compare(b1, b2)
808-
case (Ior.Right(_), Ior.Left(_)) => 1
809-
case (Ior.Right(_), Ior.Both(_, _)) => -1
805+
case (Ior.Left(a1), Ior.Left(a2)) => AA.compare(a1, a2)
806+
case (Ior.Left(_), _) => -1
807+
case (Ior.Right(b1), Ior.Right(b2)) => BB.compare(b1, b2)
808+
case (Ior.Right(_), Ior.Left(_)) => 1
809+
case (Ior.Right(_), Ior.Both(_, _)) => -1
810810
case (Ior.Both(a1, b1), Ior.Both(a2, b2)) => {
811811
val r = AA.compare(a1, a2)
812812
if (r == 0) BB.compare(b1, b2) else r
@@ -891,7 +891,7 @@ sealed abstract private[data] class IorInstances extends IorInstances0 {
891891
case Ior.Right(Right(c)) => Ior.right(c)
892892
case Ior.Both(a, Right(c)) => Ior.both(a, c)
893893
case Ior.Right(Left(b)) => loop(fn(b))
894-
case Ior.Both(a, Left(b)) =>
894+
case Ior.Both(a, Left(b)) =>
895895
fn(b) match {
896896
case Ior.Left(aa) => Ior.left(Semigroup[A].combine(a, aa))
897897
case Ior.Both(aa, x) => loop(Ior.both(Semigroup[A].combine(a, aa), x))
@@ -961,7 +961,7 @@ sealed abstract private[data] class IorInstances0 {
961961
override def mapAccumulate[S, B, C](init: S, fa: Ior[A, B])(f: (S, B) => (S, C)): (S, Ior[A, C]) =
962962
fa match {
963963
case l @ Ior.Left(_) => (init, l)
964-
case Ior.Right(b) =>
964+
case Ior.Right(b) =>
965965
val (snext, c) = f(init, b)
966966
(snext, Ior.Right(c))
967967
case Ior.Both(a, b) =>

0 commit comments

Comments
 (0)