chore: Update to Rust 1.50.0 (#9479)

This commit is contained in:
Kitson Kelly 2021-02-12 21:08:36 +11:00 committed by GitHub
parent 146fb360c6
commit 54e53cc9ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 8 deletions

View file

@ -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(