From 355ad3cb8289611b06cd42fa62ddfe0a5c716e83 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Thu, 6 May 2021 13:56:34 +0900 Subject: Tokio migration. --- helix-view/src/document.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'helix-view/src/document.rs') diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 9b6f3cca..8d6144cf 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -134,7 +134,7 @@ impl Document { self.last_saved_revision = self.history.current_revision(); async move { - use smol::{fs::File, prelude::*}; + use tokio::{fs::File, io::AsyncWriteExt}; let mut file = File::create(path).await?; // write all the rope chunks to file @@ -232,7 +232,9 @@ impl Document { transaction.changes(), ); - smol::block_on(notify).expect("failed to emit textDocument/didChange"); + if let Some(notify) = notify { + tokio::spawn(notify); + } //.expect("failed to emit textDocument/didChange"); } } success -- cgit v1.2.3-70-g09d2