Skip to content

Commit e679c85

Browse files
olafurpgjulienrf
authored andcommitted
Use scalafix.syntax.normalized instead of custom rolled.
1 parent 6f1256e commit e679c85

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

rewrites/src/main/scala/fix/Collectionstrawman_v0.scala

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,9 @@ case class Collectionstrawman_v0(mirror: SemanticCtx) extends SemanticRewrite(mi
2020
Symbol("_root_.scala.Predef.intArrayOps.")
2121
)
2222

23-
def normalize(symbol: Symbol): Symbol = {
24-
def loop(symbol: Symbol): Symbol = symbol match {
25-
case Symbol.Global(qual, Signature.Term("package")) => loop(qual)
26-
case Symbol.Global(qual, name) => Symbol.Global(loop(qual), name)
27-
case x => x
28-
}
29-
loop(symbol.normalized)
30-
}
31-
3223
def ifSymbolFound(ctx: RewriteCtx): Patch = {
3324
val toUnimport = ctx.mirror.database.names.flatMap { r =>
34-
val norm = normalize(r.sym)
25+
val norm = r.sym.normalized
3526
if (unimports.contains(norm)) norm :: Nil
3627
else Nil
3728
}

0 commit comments

Comments
 (0)