From 8852408bfb358766d59b83f294148fb5eeae26a0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 10 Jan 2019 22:47:05 +0300 Subject: use arena for sysroot --- crates/ra_arena/src/lib.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'crates/ra_arena/src') diff --git a/crates/ra_arena/src/lib.rs b/crates/ra_arena/src/lib.rs index 43bfa925a..d7d5d5265 100644 --- a/crates/ra_arena/src/lib.rs +++ b/crates/ra_arena/src/lib.rs @@ -35,12 +35,21 @@ impl fmt::Display for RawId { } } -#[derive(Clone, Debug, PartialEq, Eq)] +#[derive(Clone, PartialEq, Eq)] pub struct Arena { data: Vec, _ty: PhantomData, } +impl fmt::Debug for Arena { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fmt.debug_struct("Arena") + .field("len", &self.len()) + .field("data", &self.data) + .finish() + } +} + #[macro_export] macro_rules! impl_arena_id { ($name:ident) => { -- cgit v1.2.3