mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Minor manual cleanu
* use default derive * use `strip_prefix` where possible to avoid dup work
This commit is contained in:
parent
f1785f7a21
commit
ec55dd1d7b
4 changed files with 9 additions and 24 deletions
|
@ -9,16 +9,11 @@ use rustc_hash::FxHasher;
|
|||
use crate::{FileId, VfsPath};
|
||||
|
||||
/// Structure to map between [`VfsPath`] and [`FileId`].
|
||||
#[derive(Default)]
|
||||
pub(crate) struct PathInterner {
|
||||
map: IndexSet<VfsPath, BuildHasherDefault<FxHasher>>,
|
||||
}
|
||||
|
||||
impl Default for PathInterner {
|
||||
fn default() -> Self {
|
||||
Self { map: IndexSet::default() }
|
||||
}
|
||||
}
|
||||
|
||||
impl PathInterner {
|
||||
/// Get the id corresponding to `path`.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue