aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/rust-analyzer/src/main_loop.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index d8d10ba99..f6d8daeed 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -420,7 +420,7 @@ impl GlobalState {
420 })? 420 })?
421 .on::<lsp_types::notification::DidChangeTextDocument>(|this, params| { 421 .on::<lsp_types::notification::DidChangeTextDocument>(|this, params| {
422 if let Ok(path) = from_proto::vfs_path(&params.text_document.uri) { 422 if let Ok(path) = from_proto::vfs_path(&params.text_document.uri) {
423 assert!(this.mem_docs.contains_key(&path)); 423 *this.mem_docs.get_mut(&path).unwrap() = params.text_document.version;
424 let vfs = &mut this.vfs.write().0; 424 let vfs = &mut this.vfs.write().0;
425 let file_id = vfs.file_id(&path).unwrap(); 425 let file_id = vfs.file_id(&path).unwrap();
426 let mut text = String::from_utf8(vfs.file_contents(file_id).to_vec()).unwrap(); 426 let mut text = String::from_utf8(vfs.file_contents(file_id).to_vec()).unwrap();