Match and rewrite templates, and print changes

comby

  • Tool for structural code search and replace that supports many languages.
    More information: <https://github.com/comby-tools/comby>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

comby '{{assert_eq!(:[a], :[b])}}' '{{assert_eq!(:[b], :[a])}}' {{.rs}}

click the source code to copy