Skip to content

Commit ecce4a7

Browse files
author
scala-steward
committed
Reformat with scalafmt 3.9.10
Executed command: scalafmt --non-interactive
1 parent 8a0f283 commit ecce4a7

File tree

14 files changed

+22
-22
lines changed

14 files changed

+22
-22
lines changed

macros/src/main/scala-2/com/softwaremill/macwire/MacwireMacros.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ object MacwireMacros {
117117
.flatMap { m =>
118118
extractTypeFromNullaryType(m.typeSignature) match {
119119
case Some(tpe) => Some((m, tpe))
120-
case None =>
120+
case None =>
121121
log(s"Cannot extract type from ${m.typeSignature} for member $m!")
122122
None
123123
}

macros/src/main/scala-2/com/softwaremill/macwire/internals/DependencyResolver.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class DependencyResolver[C <: blackbox.Context, TypeC <: C#Type, TreeC <: C#Tree
1919
*/
2020
def resolve(param: Symbol, t: Type): Tree = {
2121
eligibleValues.findInFirstScope(t).toList match {
22-
case Nil => resolutionFallback(t.asInstanceOf[TypeC]).asInstanceOf[Tree]
22+
case Nil => resolutionFallback(t.asInstanceOf[TypeC]).asInstanceOf[Tree]
2323
case value :: Nil =>
2424
val forwardValues = eligibleValues.findInScope(t, LocalForward)
2525
if (forwardValues.nonEmpty) {

macros/src/main/scala-2/com/softwaremill/macwire/internals/EligibleValuesFinder.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ private[macwire] class EligibleValuesFinder[C <: blackbox.Context](val c: C, log
1616

1717
@tailrec
1818
def doFind(trees: List[(Scope, Tree)], values: EligibleValues): EligibleValues = trees match {
19-
case Nil => values
19+
case Nil => values
2020
case (scope, tree) :: tail =>
2121
tree match {
2222

@@ -150,7 +150,7 @@ private[macwire] class EligibleValuesFinder[C <: blackbox.Context](val c: C, log
150150
pp ++ selfTypes
151151

152152
case ModuleDef(_, _, Template(pp, _, _)) => pp
153-
case e =>
153+
case e =>
154154
c.error(c.enclosingPosition, s"Unknown type of enclosing class: ${e.getClass}")
155155
Nil
156156
}
@@ -314,7 +314,7 @@ private[macwire] class EligibleValuesFinder[C <: blackbox.Context](val c: C, log
314314
findInScope(tpe, scope) match {
315315
case coll if coll.isEmpty && !scope.isMax => forScope(scope.widen)
316316
case coll if coll.isEmpty => log(s"Could not find $tpe in any scope"); Nil
317-
case exprs =>
317+
case exprs =>
318318
log(s"Found [${exprs.mkString(", ")}] of type [$tpe] in scope $scope")
319319
exprs
320320
}
@@ -348,7 +348,7 @@ private[macwire] class EligibleValuesFinder[C <: blackbox.Context](val c: C, log
348348
private def enclosingClassBody: List[Tree] = c.enclosingClass match {
349349
case ClassDef(_, _, _, Template(_, _, body)) => body
350350
case ModuleDef(_, _, Template(_, _, body)) => body
351-
case e =>
351+
case e =>
352352
c.error(c.enclosingPosition, s"Unknown type of enclosing class: ${e.getClass}")
353353
Nil
354354
}

macros/src/main/scala-2/com/softwaremill/macwire/internals/package.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ package object internals {
1414

1515
val (sym: Symbol, tpeArgs: List[Type]) = targetTypeD match {
1616
case TypeRef(_, sym, tpeArgs) => (sym, tpeArgs)
17-
case t =>
17+
case t =>
1818
c.abort(
1919
c.enclosingPosition,
2020
s"Target type not supported for wiring: $t. Please file a bug report with your use-case."

macros/src/main/scala-3/com/softwaremill/macwire/internals/EligibleValuesFinder.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private[macwire] class EligibleValuesFinder[Q <: Quotes](log: Logger)(using val
105105
findInScope(tpe, scope) match {
106106
case coll if coll.isEmpty && !scope.isMax => forScope(scope.widen)
107107
case coll if coll.isEmpty => log(s"Could not find $tpe in any scope"); Nil
108-
case exprs =>
108+
case exprs =>
109109
log(s"Found [${exprs.mkString(", ")}] of type [$tpe] in scope $scope")
110110
exprs
111111
}

macros/src/main/scala-3/com/softwaremill/macwire/internals/autowire/AutowireProviders.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class AutowireProviders[Q <: Quotes](using val q: Q)(
3333
@tailrec
3434
def createProviders(deps: List[Expr[Any]], acc: Vector[Provider], seenTpes: Set[TypeRepr]): Vector[Provider] =
3535
deps match
36-
case Nil => acc
36+
case Nil => acc
3737
case dep :: otherDeps =>
3838
val term = dep.asTerm
3939
val tpe = term.tpe.dealias.widen // dealias, and widen from singleton types

macros/src/main/scala-3/com/softwaremill/macwire/internals/autowire/autowireImpl.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def autowireImpl[T: Type](dependencies: Expr[Seq[Any]])(using q: Quotes): Expr[T
1414
// extracting the provided varargs - we need an explicitly provided list of dependencies
1515
val rawDependencies: Seq[Expr[Any]] = dependencies match
1616
case Varargs(exprs) => exprs
17-
case _ =>
17+
case _ =>
1818
report.errorAndAbort(
1919
s"depedencies need to be provided directly as parameters to the autowire call; got: $dependencies"
2020
)

macrosAutoCats/src/main/scala/com/softwaremill/macwire/autocats/internals/CatsProvidersGraphContext.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class CatsProvidersGraphContext[C <: blackbox.Context](val c: C, val log: Logger
5252
ctx.withProvider(sym, provider) { currentCtx =>
5353
provider match {
5454
case _: NotResolvedProvider => currentCtx.missingPath()
55-
case _ =>
55+
case _ =>
5656
provider.dependencies.foldLeft(currentCtx) { case (paramsCtx, deps) =>
5757
deps.foldLeft(paramsCtx) { case (paramCtx, (sym, param)) => go(paramCtx)(sym, param) }
5858
}
@@ -230,7 +230,7 @@ class CatsProvidersGraphContext[C <: blackbox.Context](val c: C, val log: Logger
230230
case ((currentCtx, resolvedParams), Param(paramSym, paramTpe)) =>
231231
currentCtx.resolve(paramTpe) match {
232232
case Some(Left(provider)) => (currentCtx, resolvedParams.:+((paramSym, provider)))
233-
case Some(Right(fmt)) => {
233+
case Some(Right(fmt)) => {
234234
val (updatedCtx, fm) = resolveFactoryMethod(currentCtx)(fmt)
235235

236236
(updatedCtx, resolvedParams.:+((paramSym, fm)))
@@ -287,7 +287,7 @@ class CatsProvidersGraphContext[C <: blackbox.Context](val c: C, val log: Logger
287287
/** DFS based algorithm that resolves all `FactoryMethodTree`
288288
*/
289289
private def resolveFactoryMethods(ctx: BuilderContext): BuilderContext = ctx.next() match {
290-
case None => ctx
290+
case None => ctx
291291
case Some(fmt) => {
292292
val (updatedCtx, _) = resolveFactoryMethod(ctx)(fmt)
293293

macrosAutoCats/src/main/scala/com/softwaremill/macwire/autocats/internals/GraphBuilderUtils.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ trait GraphBuilderUtils[C <: blackbox.Context] { this: CatsProviders[C] =>
4646
.map(_.asRight[Provider])
4747

4848
val result = (resolvedProviders ++ resolvedFMT) match {
49-
case Nil => None
50-
case List(result) => Some(result)
49+
case Nil => None
50+
case List(result) => Some(result)
5151
case ambiguousProviders => {
5252
val duplicates = ambiguousProviders.map {
5353
case Left(value) => value.resultType

proxy/src/main/scala/com/softwaremill/macwire/proxy/ProxyCreator.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ object ProxyCreator {
1818
// not possible, we invoke any constructor with default values for arguments.
1919
val instance = UnsafeInstance match {
2020
case Some(unsafe) => unsafe.allocateInstance(proxiedClass)
21-
case None =>
21+
case None =>
2222
val constructor = findBestConstructor(proxiedClass)
2323
constructor.newInstance(constructor.getParameterTypes.map(getDefaultValueForClass): _*)
2424
}

0 commit comments

Comments
 (0)