From 1ad0581ddd2d1fc6eb8b96b495eb4e546d4bdd28 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Thu, 6 May 2021 14:33:53 +0900 Subject: Eliminate a few more futures dependencies. --- helix-term/src/application.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'helix-term/src') 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) } } -- cgit v1.2.3-70-g09d2