Skip to content

minor: Cleanup map_rust_child_diagnostics a bit #20366

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/rust-analyzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ tenthash = "1.1.0"
num_cpus = "1.17.0"
mimalloc = { version = "0.1.46", default-features = false, optional = true }
lsp-server.workspace = true
smallvec.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
tracing-tree.workspace = true
Expand Down
5 changes: 3 additions & 2 deletions crates/rust-analyzer/src/diagnostics.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Book keeping for keeping diagnostics easily in sync with the client.
pub(crate) mod to_proto;
pub(crate) mod flycheck_to_proto;

use std::mem;

Expand All @@ -8,6 +8,7 @@ use ide::FileId;
use ide_db::{FxHashMap, base_db::DbPanicContext};
use itertools::Itertools;
use rustc_hash::FxHashSet;
use smallvec::SmallVec;
use stdx::iter_eq_by;
use triomphe::Arc;

Expand Down Expand Up @@ -48,7 +49,7 @@ pub(crate) struct DiagnosticCollection {
#[derive(Debug, Clone)]
pub(crate) struct Fix {
// Fixes may be triggerable from multiple ranges.
pub(crate) ranges: Vec<lsp_types::Range>,
pub(crate) ranges: SmallVec<[lsp_types::Range; 1]>,
pub(crate) action: lsp_ext::CodeAction,
}

Expand Down
Loading
Loading