aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
authorSkyler Hawthorne2022-09-21 22:34:56 +0000
committerSkyler Hawthorne2022-10-19 02:31:39 +0000
commit31d1bbfddb112a1e38cf974793afc427a3614ecf (patch)
tree13f95349262b8451ba8684fada0e75c546871c56 /helix-view/src
parent9e64974f13e91470be7b411285b7a33c698da3aa (diff)
review comments
Diffstat (limited to 'helix-view/src')
-rw-r--r--helix-view/src/document.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index 4a09bedc..0774e516 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -554,12 +554,7 @@ impl Document {
}
};
- let identifier = if self.path().is_some() {
- Some(self.identifier())
- } else {
- None
- };
-
+ let identifier = self.path().map(|_| self.identifier());
let language_server = self.language_server.clone();
// mark changes up to now as saved
@@ -708,10 +703,7 @@ impl Document {
/// and flushing through the queue of pending writes. If any fail,
/// it stops early before emptying the rest of the queue.
pub async fn close(&mut self) -> Option<DocumentSavedEventResult> {
- if self.save_sender.is_some() {
- self.save_sender.take();
- }
-
+ self.save_sender.take();
self.flush_saves_impl(true).await
}