From 4a0b2c28a15d76c0c40bf07c3753dfbcce4dace1 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 29 Mar 2022 17:28:55 -0400 Subject: [PATCH] chore(ci): fix lsp bench due to notification that was accidentally added (#14148) --- cli/lsp/language_server.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index 56c0be3d2d..e0d99aa696 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -1063,13 +1063,12 @@ impl Inner { }; match format_result { - Ok(new_text) => new_text.map(|new_text| { - text::get_edits( - document.content().as_str(), - &new_text, - document.line_index().as_ref(), - ) - }), + Ok(Some(new_text)) => Some(text::get_edits( + document.content().as_str(), + &new_text, + document.line_index().as_ref(), + )), + Ok(None) => Some(Vec::new()), Err(err) => { // TODO(lucacasonato): handle error properly warn!("Format error: {}", err);