mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-29 06:23:25 +00:00
remove unused struct Snap in lsif
This commit is contained in:
parent
2397e7a887
commit
79508d909a
1 changed files with 1 additions and 13 deletions
|
@ -7,11 +7,7 @@ use ide::{
|
||||||
Analysis, AnalysisHost, FileId, FileRange, MonikerKind, PackageInformation, RootDatabase,
|
Analysis, AnalysisHost, FileId, FileRange, MonikerKind, PackageInformation, RootDatabase,
|
||||||
StaticIndex, StaticIndexedFile, TokenId, TokenStaticData,
|
StaticIndex, StaticIndexedFile, TokenId, TokenStaticData,
|
||||||
};
|
};
|
||||||
use ide_db::{
|
use ide_db::{line_index::WideEncoding, LineIndexDatabase};
|
||||||
base_db::salsa::{self, ParallelDatabase},
|
|
||||||
line_index::WideEncoding,
|
|
||||||
LineIndexDatabase,
|
|
||||||
};
|
|
||||||
use load_cargo::{load_workspace, LoadCargoConfig, ProcMacroServerChoice};
|
use load_cargo::{load_workspace, LoadCargoConfig, ProcMacroServerChoice};
|
||||||
use lsp_types::lsif;
|
use lsp_types::lsif;
|
||||||
use project_model::{CargoConfig, ProjectManifest, ProjectWorkspace, RustLibSource};
|
use project_model::{CargoConfig, ProjectManifest, ProjectWorkspace, RustLibSource};
|
||||||
|
@ -25,14 +21,6 @@ use crate::{
|
||||||
version::version,
|
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> {
|
struct LsifManager<'a> {
|
||||||
count: i32,
|
count: i32,
|
||||||
token_map: FxHashMap<TokenId, Id>,
|
token_map: FxHashMap<TokenId, Id>,
|
||||||
|
|
Loading…
Reference in a new issue