Skip to content

Commit

Permalink
Auto merge of #16795 - mu001999:master, r=Veykril
Browse files Browse the repository at this point in the history
remove unused struct Snap in lsif

Detected by #121752, see rust-lang/rust#121752 (comment)
  • Loading branch information
bors committed Mar 9, 2024
2 parents 2397e7a + 79508d9 commit 8f08bbe
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions crates/rust-analyzer/src/cli/lsif.rs
Expand Up @@ -7,11 +7,7 @@ use ide::{
Analysis, AnalysisHost, FileId, FileRange, MonikerKind, PackageInformation, RootDatabase,
StaticIndex, StaticIndexedFile, TokenId, TokenStaticData,
};
use ide_db::{
base_db::salsa::{self, ParallelDatabase},
line_index::WideEncoding,
LineIndexDatabase,
};
use ide_db::{line_index::WideEncoding, LineIndexDatabase};
use load_cargo::{load_workspace, LoadCargoConfig, ProcMacroServerChoice};
use lsp_types::lsif;
use project_model::{CargoConfig, ProjectManifest, ProjectWorkspace, RustLibSource};
Expand All @@ -25,14 +21,6 @@ use crate::{
version::version,
};

/// Need to wrap Snapshot to provide `Clone` impl for `map_with`
struct Snap<DB>(DB);
impl<DB: ParallelDatabase> Clone for Snap<salsa::Snapshot<DB>> {
fn clone(&self) -> Snap<salsa::Snapshot<DB>> {
Snap(self.0.snapshot())
}
}

struct LsifManager<'a> {
count: i32,
token_map: FxHashMap<TokenId, Id>,
Expand Down

0 comments on commit 8f08bbe

Please sign in to comment.