aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-05-06 05:33:53 +0000
committerBlaž Hrastnik2021-05-06 05:33:53 +0000
commit1ad0581ddd2d1fc6eb8b96b495eb4e546d4bdd28 (patch)
tree94a707fb924c70b86905752c00f9dcbe97f73f08 /helix-term
parent355ad3cb8289611b06cd42fa62ddfe0a5c716e83 (diff)
Eliminate a few more futures dependencies.
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/Cargo.toml2
-rw-r--r--helix-term/src/application.rs12
2 files changed, 7 insertions, 7 deletions
diff --git a/helix-term/Cargo.toml b/helix-term/Cargo.toml
index b9f27cae..73468f4d 100644
--- a/helix-term/Cargo.toml
+++ b/helix-term/Cargo.toml
@@ -25,7 +25,7 @@ tui = { version = "0.15", default-features = false, features = ["crossterm"] }
crossterm = { version = "0.19", features = ["event-stream"] }
clap = { version = "3.0.0-beta.2 ", default-features = false, features = ["std", "cargo"] }
-futures-util = "0.3"
+futures-util = { version = "0.3", features = ["std", "async-await"] }
# Logging
fern = "0.6"
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 3bf746ea..9838998a 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -23,7 +23,6 @@ use crossterm::{
use tui::layout::Rect;
-// use futures_util::future::BoxFuture;
use futures_util::stream::FuturesUnordered;
use std::pin::Pin;
@@ -92,15 +91,16 @@ impl Application {
break;
}
- use futures_util::{select, FutureExt, StreamExt};
- select! {
- event = reader.next().fuse() => {
+ use futures_util::StreamExt;
+
+ tokio::select! {
+ event = reader.next() => {
self.handle_terminal_events(event)
}
- call = futures_util::StreamExt::select_next_some(&mut self.editor.language_servers.incoming) => {
+ Some(call) = self.editor.language_servers.incoming.next() => {
self.handle_language_server_message(call).await
}
- callback = futures_util::StreamExt::select_next_some(&mut self.callbacks) => {
+ Some(callback) = &mut self.callbacks.next() => {
self.handle_language_server_callback(callback)
}
}