Skip to content
Permalink
Browse files

Use more idiomatic method to patch renamed Sink.

  • Loading branch information...
tmciver committed May 24, 2019
1 parent d960793 commit 4f60a02ff6d8c54bb5c4871aab377bfc2867571f
Showing with 1 addition and 4 deletions.
  1. +1 −4 scalafix/rules/src/main/scala/fix/v1.scala
@@ -540,10 +540,7 @@ object SinkToPipeRules {
case sink @ Type.Apply(sinkMatcher(name), List(f, a)) =>
name match {
case t"Sink" => Patch.replaceTree(sink, s"Pipe[$f, $a, Unit]")
case _ => {
val typeName = name.toString
Patch.replaceTree(sink, s"$typeName[$f, $a, Unit]")
}
case _ => Patch.addRight(a, ", Unit")
}

case sink @ Importee.Rename(Name("Sink"), rename) =>

0 comments on commit 4f60a02

Please sign in to comment.
You can’t perform that action at this time.