Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(language_server): fix clippy::significant_drop_in_scrutinee warning #9234

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading