From 7f99a02ddb3ff30388ae1dd5db06e332c215fea2 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 7 Mar 2013 18:37:22 -0500 Subject: syntax: Remove uses of DVec --- src/libsyntax/util/interner.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/libsyntax/util') diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs index 2c852084aa7..7a5708049e9 100644 --- a/src/libsyntax/util/interner.rs +++ b/src/libsyntax/util/interner.rs @@ -13,12 +13,11 @@ // type, and vice versa. use core::prelude::*; -use core::dvec::DVec; use core::hashmap::linear::LinearMap; pub struct Interner { priv map: @mut LinearMap, - priv vect: DVec, + priv vect: @mut ~[T], } // when traits can extend traits, we should extend index to get [] @@ -26,7 +25,7 @@ pub impl Interner { static fn new() -> Interner { Interner { map: @mut LinearMap::new(), - vect: DVec(), + vect: @mut ~[], } } @@ -58,7 +57,7 @@ pub impl Interner { // this isn't "pure" in the traditional sense, because it can go from // failing to returning a value as items are interned. But for typestate, // where we first check a pred and then rely on it, ceasing to fail is ok. - pure fn get(&self, idx: uint) -> T { self.vect.get_elt(idx) } + pure fn get(&self, idx: uint) -> T { self.vect[idx] } fn len(&self) -> uint { self.vect.len() } } -- cgit 1.4.1-3-g733a5