@@ -89,14 +89,14 @@ impl Serialize for Mode {
8989
9090/// A snapshot of the text of a document that we want to write out to disk
9191#[derive(Debug, Clone)]
92−pub struct DocumentSaveEvent {
92+pub struct DocumentSavedEvent {
9393 pub revision: usize,
9494 pub doc_id: DocumentId,
9595 pub path: PathBuf,
9696}
9797
98−pub type DocumentSaveEventResult = Result<DocumentSaveEvent, anyhow::Error>;
99−pub type DocumentSaveEventFuture = BoxFuture<'static, DocumentSaveEventResult>;
98+pub type DocumentSavedEventResult = Result<DocumentSavedEvent, anyhow::Error>;
99+pub type DocumentSavedEventFuture = BoxFuture<'static, DocumentSavedEventResult>;
100100
101101pub struct Document {
102102 pub(crate) id: DocumentId,
@@ -133,9 +133,9 @@ pub struct Document {
133133 last_saved_revision: usize,
134134 version: i32, // should be usize?
135135 pub(crate) modified_since_accessed: bool,
136− save_sender: Option<UnboundedSender<DocumentSaveEventFuture>>,
137− save_receiver: Option<UnboundedReceiver<DocumentSaveEventFuture>>,
138− current_save: Arc<Mutex<Option<DocumentSaveEventFuture>>>,
136+ save_sender: Option<UnboundedSender<DocumentSavedEventFuture>>,
137+ save_receiver: Option<UnboundedReceiver<DocumentSavedEventFuture>>,
138+ current_save: Arc<Mutex<Option<DocumentSavedEventFuture>>>,
139139
140140 diagnostics: Vec<Diagnostic>,
141141 language_server: Option<Arc<helix_lsp::Client>>,
@@ -616,7 +616,7 @@ impl Document {
616616 let mut file = File::create(&path).await?;
617617 to_writer(&mut file, encoding, &text).await?;
618618
619− let event = DocumentSaveEvent {
619+ let event = DocumentSavedEvent {
620620 revision: current_rev,
621621 doc_id,
622622 path,
@@ -643,11 +643,11 @@ impl Document {
643643 .map_err(|err| anyhow!("failed to send save event: {}", err))
644644 }
645645
646− pub async fn await_save(&mut self) -> Option<DocumentSaveEventResult> {
646+ pub async fn await_save(&mut self) -> Option<DocumentSavedEventResult> {
647647 self.await_save_impl(true).await
648648 }
649649
650− async fn await_save_impl(&mut self, block: bool) -> Option<DocumentSaveEventResult> {
650+ async fn await_save_impl(&mut self, block: bool) -> Option<DocumentSavedEventResult> {
651651 let mut current_save = self.current_save.lock().await;
652652 if let Some(ref mut save) = *current_save {
653653 log::trace!("reawaiting save of '{:?}'", self.path());
@@ -698,11 +698,11 @@ impl Document {
698698
699699 /// Flushes the queue of pending writes. If any fail,
700700 /// it stops early before emptying the rest of the queue.
701− pub async fn try_flush_saves(&mut self) -> Option<DocumentSaveEventResult> {
701+ pub async fn try_flush_saves(&mut self) -> Option<DocumentSavedEventResult> {
702702 self.flush_saves_impl(false).await
703703 }
704704
705− async fn flush_saves_impl(&mut self, block: bool) -> Option<DocumentSaveEventResult> {
705+ async fn flush_saves_impl(&mut self, block: bool) -> Option<DocumentSavedEventResult> {
706706 let mut final_result = None;
707707
708708 while let Some(save_event) = self.await_save_impl(block).await {
@@ -734,7 +734,7 @@ impl Document {
734734 /// Prepares the Document for being closed by stopping any new writes
735735 /// and flushing through the queue of pending writes. If any fail,
736736 /// it stops early before emptying the rest of the queue.
737− pub async fn close(&mut self) -> Option<DocumentSaveEventResult> {
737+ pub async fn close(&mut self) -> Option<DocumentSavedEventResult> {
738738 if self.save_sender.is_some() {
739739 self.save_sender.take();
740740 }