Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Auto merge of #1729 - workingjubilee:latest-itertools-fst, r=Xanewok
Browse files Browse the repository at this point in the history
itertools = 0.9, fst = 0.4

Bumps itertools, fst, and rayon's dependencies, which allows for two
dependencies to be removed from the lockfile.

Slightly alters fst::Map's signature because it is now generic.
  • Loading branch information
bors committed Apr 22, 2021
2 parents c7a19f6 + fa72434 commit d1376b5
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 52 deletions.
70 changes: 26 additions & 44 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ test = false
path = "rls/src/main.rs"

[dependencies]
rls-analysis = "0.18.1"
# FIXME: Release rls-analysis 0.18.2 to crates.io
rls-analysis = { version = "0.18.2", path = "rls-analysis" }
rls-data = "0.19"
# FIXME: Release rls-rustc 0.6.0 to crates.io
rls-rustc = { version = "0.6.0", path = "rls-rustc" }
Expand All @@ -36,7 +37,7 @@ cargo_metadata = "0.8"
clippy_lints = { git = "https://github.com/rust-lang/rust-clippy", rev = "7ea7cd165ad6705603852771bf82cc2fd6560db5", optional = true }
env_logger = "0.7"
home = "0.5.1"
itertools = "0.8"
itertools = "0.9"
jsonrpc-core = "17"
lsp-types = { version = "0.60", features = ["proposed"] }
lazy_static = "1"
Expand Down
6 changes: 3 additions & 3 deletions rls-analysis/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rls-analysis"
version = "0.18.1"
version = "0.18.2"
edition = "2018"
authors = ["Nick Cameron <ncameron@mozilla.com>"]
description = "Library for processing rustc's save-analysis data for the RLS"
Expand All @@ -21,8 +21,8 @@ log = "0.4"
rls-data = "= 0.19"
rls-span = "0.5.2"
derive-new = "0.5"
fst = { version = "0.3", default-features = false }
itertools = "0.8"
fst = { version = "0.4", default-features = false }
itertools = "0.9"
json = "0.12"
serde = "1.0"
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion rls-analysis/src/analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub struct PerCrateAnalysis {

// Index of all symbols that powers the search.
// See `SymbolQuery`.
pub def_fst: fst::Map,
pub def_fst: fst::Map<Vec<u8>>,
pub def_fst_values: Vec<Vec<Id>>,

pub ref_spans: HashMap<Id, Vec<Span>>,
Expand Down
2 changes: 1 addition & 1 deletion rls-analysis/src/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ fn abs_ref_id<L: AnalysisLoader>(
None
}

fn build_index(mut defs: Vec<(String, Id)>) -> (fst::Map, Vec<Vec<Id>>) {
fn build_index(mut defs: Vec<(String, Id)>) -> (fst::Map<Vec<u8>>, Vec<Vec<Id>>) {
defs.sort_by(|(n1, _), (n2, _)| n1.cmp(n2));
let by_name = defs.into_iter().group_by(|(n, _)| n.clone());

Expand Down
2 changes: 1 addition & 1 deletion rls-analysis/src/symbol_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl SymbolQuery {

pub(crate) fn build_stream<'a, I>(&'a self, fsts: I) -> fst::map::Union<'a>
where
I: Iterator<Item = &'a fst::Map>,
I: Iterator<Item = &'a fst::Map<Vec<u8>>>,
{
let mut stream = fst::map::OpBuilder::new();
let automaton = QueryAutomaton { query: &self.query_string, mode: self.mode };
Expand Down

0 comments on commit d1376b5

Please sign in to comment.