mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Simplify Arena to use a generic index
This commit is contained in:
parent
988f1dda6b
commit
f840fcb2f5
17 changed files with 179 additions and 189 deletions
|
@ -7,16 +7,14 @@ use std::{
|
|||
process::{Command, Output},
|
||||
};
|
||||
|
||||
use ra_arena::{impl_arena_id, Arena, RawId};
|
||||
use ra_arena::{Arena, Idx};
|
||||
|
||||
#[derive(Default, Debug, Clone)]
|
||||
pub struct Sysroot {
|
||||
crates: Arena<SysrootCrate, SysrootCrateData>,
|
||||
crates: Arena<SysrootCrateData>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct SysrootCrate(RawId);
|
||||
impl_arena_id!(SysrootCrate);
|
||||
pub type SysrootCrate = Idx<SysrootCrateData>;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct SysrootCrateData {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue