diff options
Diffstat (limited to 'cli/lsp')
-rw-r--r-- | cli/lsp/language_server.rs | 6 | ||||
-rw-r--r-- | cli/lsp/tsc.rs | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index 7ae4de978..5b4ab0f99 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -1685,7 +1685,7 @@ impl Inner { Some(Err(err)) => Err(LspError::invalid_params(err.to_string())), None => Err(LspError::invalid_params("Missing parameters")), }, - "deno/performance" => self.get_performance(), + "deno/performance" => Ok(Some(self.get_performance())), "deno/virtualTextDocument" => match params.map(serde_json::from_value) { Some(Ok(params)) => Ok(Some( serde_json::to_value(self.virtual_text_document(params).await?) @@ -1902,9 +1902,9 @@ impl Inner { Ok(true) } - fn get_performance(&self) -> LspResult<Option<Value>> { + fn get_performance(&self) -> Value { let averages = self.performance.averages(); - Ok(Some(json!({ "averages": averages }))) + json!({ "averages": averages }) } async fn virtual_text_document( diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index a66541dd2..9a5b94f85 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -1175,6 +1175,7 @@ fn respond(state: &mut State, args: Value) -> Result<Value, AnyError> { Ok(json!(true)) } +#[allow(clippy::unnecessary_wraps)] fn script_names(state: &mut State, _args: Value) -> Result<Value, AnyError> { Ok(json!(state.state_snapshot.documents.open_specifiers())) } |