mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 07:04:22 +00:00
⬆️ fst
This commit is contained in:
parent
d563e3868b
commit
59a3ec5f33
3 changed files with 5 additions and 14 deletions
13
Cargo.lock
generated
13
Cargo.lock
generated
|
@ -87,12 +87,6 @@ dependencies = [
|
|||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
|
||||
|
||||
[[package]]
|
||||
name = "cargo_metadata"
|
||||
version = "0.9.1"
|
||||
|
@ -392,12 +386,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "fst"
|
||||
version = "0.3.5"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "927fb434ff9f0115b215dc0efd2e4fbdd7448522a92a1aa37c77d6a2f8f1ebd6"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
]
|
||||
checksum = "3f7c13470d799474d44e2b9c6a0925807def7af4d120cd4de761433be76f7579"
|
||||
|
||||
[[package]]
|
||||
name = "fuchsia-zircon"
|
||||
|
|
|
@ -13,7 +13,7 @@ wasm = []
|
|||
[dependencies]
|
||||
log = "0.4.8"
|
||||
rayon = "1.3.0"
|
||||
fst = { version = "0.3.5", default-features = false }
|
||||
fst = { version = "0.4", default-features = false }
|
||||
rustc-hash = "1.1.0"
|
||||
superslice = "1.0.0"
|
||||
once_cell = "1.3.1"
|
||||
|
|
|
@ -163,7 +163,7 @@ pub fn index_resolve(db: &RootDatabase, name_ref: &ast::NameRef) -> Vec<FileSymb
|
|||
#[derive(Default)]
|
||||
pub struct SymbolIndex {
|
||||
symbols: Vec<FileSymbol>,
|
||||
map: fst::Map,
|
||||
map: fst::Map<Vec<u8>>,
|
||||
}
|
||||
|
||||
impl fmt::Debug for SymbolIndex {
|
||||
|
@ -221,7 +221,7 @@ impl SymbolIndex {
|
|||
builder.insert(key, value).unwrap();
|
||||
}
|
||||
|
||||
let map = fst::Map::from_bytes(builder.into_inner().unwrap()).unwrap();
|
||||
let map = fst::Map::new(builder.into_inner().unwrap()).unwrap();
|
||||
SymbolIndex { symbols, map }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue