Add SnippetEdit to be alongside source changes

Rendering of snippet edits is deferred to places using source change
This commit is contained in:
DropDemBits 2023-07-12 00:36:06 -04:00
parent 75ac37f317
commit 89f7bf7411
No known key found for this signature in database
GPG key ID: 7FE02A6C1EDFA075
7 changed files with 335 additions and 160 deletions

View file

@ -49,8 +49,11 @@ fn check_nth_fix(nth: usize, ra_fixture_before: &str, ra_fixture_after: &str) {
let file_id = *source_change.source_file_edits.keys().next().unwrap();
let mut actual = db.file_text(file_id).to_string();
for edit in source_change.source_file_edits.values() {
for (edit, snippet_edit) in source_change.source_file_edits.values() {
edit.apply(&mut actual);
if let Some(snippet_edit) = snippet_edit {
snippet_edit.apply(&mut actual);
}
}
actual
};