From a02b10a0621adfe36eb3cc2e46f45fc7ccdb7ea2 Mon Sep 17 00:00:00 2001 From: Eduard Burtescu Date: Fri, 14 Feb 2014 07:07:09 +0200 Subject: Refactored ast_map and friends, mainly to have Paths without storing them. --- src/libsyntax/util/interner.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/libsyntax/util') diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs index fc3e55dcde2..aedff2d7854 100644 --- a/src/libsyntax/util/interner.rs +++ b/src/libsyntax/util/interner.rs @@ -21,16 +21,16 @@ use std::hashmap::HashMap; use std::rc::Rc; pub struct Interner { - priv map: @RefCell>, - priv vect: @RefCell<~[T]>, + priv map: RefCell>, + priv vect: RefCell<~[T]>, } // when traits can extend traits, we should extend index to get [] impl Interner { pub fn new() -> Interner { Interner { - map: @RefCell::new(HashMap::new()), - vect: @RefCell::new(~[]), + map: RefCell::new(HashMap::new()), + vect: RefCell::new(~[]), } } @@ -123,18 +123,18 @@ impl RcStr { } // A StrInterner differs from Interner in that it accepts -// references rather than @ ones, resulting in less allocation. +// &str rather than RcStr, resulting in less allocation. pub struct StrInterner { - priv map: @RefCell>, - priv vect: @RefCell<~[RcStr]>, + priv map: RefCell>, + priv vect: RefCell<~[RcStr]>, } // when traits can extend traits, we should extend index to get [] impl StrInterner { pub fn new() -> StrInterner { StrInterner { - map: @RefCell::new(HashMap::new()), - vect: @RefCell::new(~[]), + map: RefCell::new(HashMap::new()), + vect: RefCell::new(~[]), } } -- cgit 1.4.1-3-g733a5