Hash file contents to verify whether file actually changed

This commit is contained in:
Lukas Wirth 2024-05-14 11:55:12 +02:00
parent 793396c624
commit 1ca97ba896
4 changed files with 75 additions and 94 deletions

View file

@ -361,8 +361,8 @@ fn load_crate_graph(
}
}
let changes = vfs.take_changes();
for file in changes {
if let vfs::Change::Create(v) | vfs::Change::Modify(v) = file.change {
for (_, file) in changes {
if let vfs::Change::Create(v, _) | vfs::Change::Modify(v, _) = file.change {
if let Ok(text) = String::from_utf8(v) {
analysis_change.change_file(file.file_id, Some(text))
}