From 03752f913d194a4154c23682b125a34811f96c81 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 28 Mar 2022 11:05:55 +0200 Subject: [PATCH] Fix warnings --- crates/lsp/src/lsp.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/lsp/src/lsp.rs b/crates/lsp/src/lsp.rs index 6e729fc62b..fad49d2424 100644 --- a/crates/lsp/src/lsp.rs +++ b/crates/lsp/src/lsp.rs @@ -1,8 +1,6 @@ use anyhow::{anyhow, Context, Result}; use collections::HashMap; -use futures::{ - channel::oneshot, future::BoxFuture, io::BufWriter, AsyncRead, AsyncWrite, FutureExt, -}; +use futures::{channel::oneshot, io::BufWriter, AsyncRead, AsyncWrite}; use gpui::{executor, Task}; use parking_lot::{Mutex, RwLock}; use postage::{barrier, prelude::Stream}; @@ -560,7 +558,11 @@ type FakeLanguageServerHandlers = Arc< &'static str, Box< dyn Send - + FnMut(usize, &[u8], gpui::AsyncAppContext) -> BoxFuture<'static, Vec>, + + FnMut( + usize, + &[u8], + gpui::AsyncAppContext, + ) -> futures::future::BoxFuture<'static, Vec>, >, >, >, @@ -724,6 +726,8 @@ impl FakeLanguageServer { F: 'static + Send + FnMut(T::Params, gpui::AsyncAppContext) -> Fut, Fut: 'static + Send + Future, { + use futures::FutureExt as _; + let (responded_tx, responded_rx) = futures::channel::mpsc::unbounded(); self.handlers.lock().insert( T::METHOD,