Remove SyntaxRewriter usage in insert_use in favor of ted

This commit is contained in:
Lukas Wirth 2021-04-20 02:05:22 +02:00
parent e8744ed9bb
commit fa20a5064b
8 changed files with 185 additions and 243 deletions

View file

@ -598,6 +598,7 @@ pub mod tokens {
SOURCE_FILE
.tree()
.syntax()
.clone_for_update()
.descendants_with_tokens()
.filter_map(|it| it.into_token())
.find(|it| it.kind() == WHITESPACE && it.text() == "\n\n")