Skip to content

Commit c4a857a

Browse files
Remove dead code
1 parent f2b8c3b commit c4a857a

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

scalafix/rules/src/main/scala/fix/Stable212Base.scala

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -250,34 +250,6 @@ trait Stable212Base extends CrossCompatibility { self: SemanticRule =>
250250
} else Patch.empty
251251
}
252252

253-
def extractCollection(toCol: Tree): String = {
254-
toCol match {
255-
// case Term.ApplyType(q"scala.Predef.fallbackStringCanBuildFrom", _) =>
256-
// "scala.collection.immutable.IndexedSeq"
257-
// case Term.ApplyType(Term.Select(coll, _), _) =>
258-
// coll.syntax
259-
// case Term.Apply(Term.ApplyType(Term.Select(coll, _), _), _) =>
260-
// coll.syntax
261-
// case Term.Select(coll, _) =>
262-
// coll.syntax
263-
// case coll: Type.Name =>
264-
// coll.syntax
265-
case _ => {
266-
throw new Exception(
267-
s"""|cannot extract collection from .to
268-
|
269-
|---------------------------------------------
270-
|syntax:
271-
|${toCol.syntax}
272-
|
273-
|---------------------------------------------
274-
|structure:
275-
|${toCol.structure}""".stripMargin
276-
)
277-
}
278-
}
279-
}
280-
281253
def replaceTo(ctx: RuleCtx): Patch = {
282254
val syntheticsByEndPos: Map[Int, Seq[Synthetic]] =
283255
ctx.index.synthetics.groupBy(_.position.end)
@@ -585,9 +557,6 @@ trait Stable212Base extends CrossCompatibility { self: SemanticRule =>
585557
}
586558

587559
override def fix(ctx: RuleCtx): Patch = {
588-
// println("-----")
589-
// ctx.index.synthetics.sortBy(_.position.start).foreach(println)
590-
591560
replaceTraversable(ctx) +
592561
replaceCanBuildFrom(ctx) +
593562
replaceTo(ctx) +

0 commit comments

Comments
 (0)