Skip to content

Commit 4f4582a

Browse files
kjeremymatklad
andauthored
Update crates/rust-analyzer/src/main_loop.rs
Co-authored-by: Aleksey Kladov <[email protected]>
1 parent 79a3dd0 commit 4f4582a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/rust-analyzer/src/main_loop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ impl GlobalState {
420420
})?
421421
.on::<lsp_types::notification::DidChangeTextDocument>(|this, params| {
422422
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;
424424
let vfs = &mut this.vfs.write().0;
425425
let file_id = vfs.file_id(&path).unwrap();
426426
let mut text = String::from_utf8(vfs.file_contents(file_id).to_vec()).unwrap();

0 commit comments

Comments
 (0)