@@ -99,10 +99,10 @@ impl Application {
99 event = reader.next().fuse() => {
99 event = reader.next().fuse() => {
100 self.handle_terminal_events(event)
100 self.handle_terminal_events(event)
102− call = self.editor.language_servers.incoming.next().fuse() => {
102+ call = futures_util::StreamExt::select_next_some(&mut self.editor.language_servers.incoming) => {
103 self.handle_language_server_message(call).await
103 self.handle_language_server_message(call).await
105− callback = self.callbacks.next().fuse() => {
105+ callback = futures_util::StreamExt::select_next_some(&mut self.callbacks) => {
106 self.handle_language_server_callback(callback)
106 self.handle_language_server_callback(callback)
@@ -110,9 +110,9 @@ impl Application {
111 pub fn handle_language_server_callback(
111 pub fn handle_language_server_callback(
112 &mut self,
112 &mut self,
113− callback: Option<Result<LspCallbackWrapper, anyhow::Error>>,
113+ callback: Result<LspCallbackWrapper, anyhow::Error>,
115− if let Some(Ok(callback)) = callback {
115+ if let Ok(callback) = callback {
116 // TODO: handle Err()
116 // TODO: handle Err()
117 callback(&mut self.editor, &mut self.compositor);
117 callback(&mut self.editor, &mut self.compositor);
118 self.render();
118 self.render();
@@ -144,12 +144,10 @@ impl Application {
147− pub async fn handle_language_server_message(&mut self, call: Option<helix_lsp::Call>) {
147+ pub async fn handle_language_server_message(&mut self, call: helix_lsp::Call) {
148 use helix_lsp::{Call, Notification};
148 use helix_lsp::{Call, Notification};
149 match call {
149 match call {
150− Some(Call::Notification(helix_lsp::jsonrpc::Notification {
150+ Call::Notification(helix_lsp::jsonrpc::Notification { method, params, .. }) => {
153 let notification = Notification::parse(&method, params);
151 let notification = Notification::parse(&method, params);
154 match notification {
152 match notification {
155 Notification::PublishDiagnostics(params) => {
153 Notification::PublishDiagnostics(params) => {
@@ -203,7 +201,7 @@ impl Application {
203 _ => unreachable!(),
201 _ => unreachable!(),
206− Some(Call::MethodCall(call)) => {
204+ Call::MethodCall(call) => {
207 error!("Method not found {}", call.method);
205 error!("Method not found {}", call.method);
209 // self.language_server.reply(
207 // self.language_server.reply(
@@ -216,7 +214,6 @@ impl Application {
220 e => unreachable!("{:?}", e),
217 e => unreachable!("{:?}", e),