diff options
author | Jeremy Kolb <[email protected]> | 2020-07-22 13:59:05 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-22 13:59:05 +0100 |
commit | 4f4582a6ad263d8c9051c75a3a38ecfe41695316 (patch) | |
tree | ef38c567fda9a1c322773ca92ee93c784ae4cab2 | |
parent | 79a3dd085c2e9b906c33a1ae1194449d02832036 (diff) |
Update crates/rust-analyzer/src/main_loop.rs
Co-authored-by: Aleksey Kladov <[email protected]>
-rw-r--r-- | crates/rust-analyzer/src/main_loop.rs | 2 |
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(¶ms.text_document.uri) { | 422 | if let Ok(path) = from_proto::vfs_path(¶ms.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(); |