mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
VFS no longer stores all source files in memory
This commit is contained in:
parent
af40101841
commit
1c40ac79c8
9 changed files with 130 additions and 143 deletions
|
@ -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()))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue