Merge commit '9d8889cdfc' into sync-from-ra

This commit is contained in:
Laurențiu Nicola 2024-01-15 11:40:09 +02:00
parent 3afeb24198
commit 6bbd106c70
104 changed files with 1652 additions and 1026 deletions

View file

@ -322,7 +322,7 @@ fn load_crate_graph(
break;
}
}
vfs::loader::Message::Loaded { files } => {
vfs::loader::Message::Loaded { files } | vfs::loader::Message::Changed { files } => {
for (path, contents) in files {
vfs.set_file_contents(path.into(), contents);
}
@ -331,9 +331,8 @@ fn load_crate_graph(
}
let changes = vfs.take_changes();
for file in changes {
if file.exists() {
let contents = vfs.file_contents(file.file_id);
if let Ok(text) = std::str::from_utf8(contents) {
if let vfs::Change::Create(v) | vfs::Change::Modify(v) = file.change {
if let Ok(text) = std::str::from_utf8(&v) {
analysis_change.change_file(file.file_id, Some(text.into()))
}
}