Use more natural signature for Edit::apply

This commit is contained in:
Aleksey Kladov 2020-05-05 23:23:29 +02:00
parent 4a6fa8f0df
commit 27c7ef6d65
4 changed files with 42 additions and 20 deletions

View file

@ -142,7 +142,8 @@ impl Parse<SourceFile> {
}
fn full_reparse(&self, indel: &Indel) -> Parse<SourceFile> {
let text = indel.apply(self.tree().syntax().text().to_string());
let mut text = self.tree().syntax().text().to_string();
indel.apply(&mut text);
SourceFile::parse(&text)
}
}