aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/application.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-23 08:47:40 +0000
committerBlaž Hrastnik2021-03-23 09:14:35 +0000
commit8328fe926d34d12031cb50db47a9dd39ed681a84 (patch)
treeacea128c5a3c2276f7ad553666a6572a5ba7d62d /helix-term/src/application.rs
parent3f9a94fd4364fe277f11668b0bfab4f2735c4daf (diff)
Drop refcell use, make view simply ref doc.id.
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r--helix-term/src/application.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 8af963a9..38c0d88a 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -129,10 +129,9 @@ impl Application {
.editor
.documents
.iter_mut()
- .find(|(_, doc)| doc.borrow().path() == path.as_ref());
+ .find(|(_, doc)| doc.path() == path.as_ref());
if let Some((_, doc)) = doc {
- let mut doc = doc.borrow_mut();
let text = doc.text();
let diagnostics = params
@@ -167,7 +166,6 @@ impl Application {
.collect();
doc.diagnostics = diagnostics;
- drop(doc);
// TODO: we want to process all the events in queue, then render. publishDiagnostic tends to send a whole bunch of events
self.render();
}