Stop using an Arc when setting the file text

This commit is contained in:
Laurențiu Nicola 2024-01-10 12:17:10 +02:00
parent 02b6c181dd
commit 0f43b55e83
11 changed files with 21 additions and 24 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 {
if let Ok(text) = std::str::from_utf8(&v) {
analysis_change.change_file(file.file_id, Some(text.into()))
if let Ok(text) = String::from_utf8(v) {
analysis_change.change_file(file.file_id, Some(text))
}
}
}