Skip to content

Commit

Permalink
fix(language_server): fix clippy::significant_drop_in_scrutinee war…
Browse files Browse the repository at this point in the history
…ning
  • Loading branch information
Boshen committed Feb 19, 2025
1 parent 7c10ae5 commit f79ea71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ doc_markdown = "allow"
# `const` functions do not make sense for our project because this is not a `const` library.
# This rule also confuses newcomers and forces them to add `const` blindlessly without any reason.
missing_const_for_fn = "allow"
significant_drop_in_scrutinee = "warn"
# cargo
cargo = { level = "warn", priority = -1 }
multiple_crate_versions = "allow"
Expand Down
3 changes: 2 additions & 1 deletion crates/oxc_language_server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ impl Backend {

async fn handle_file_update(&self, uri: Url, content: Option<String>, version: Option<i32>) {
if let Some(Some(_root_uri)) = self.root_uri.get() {
if let Some(diagnostics) = self.server_linter.read().await.run_single(&uri, content) {
let diagnostics = self.server_linter.read().await.run_single(&uri, content);
if let Some(diagnostics) = diagnostics {
self.client
.publish_diagnostics(
uri.clone(),
Expand Down

0 comments on commit f79ea71

Please sign in to comment.