diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-03-07 18:37:22 -0500 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-03-08 09:54:20 -0500 |
| commit | 7f99a02ddb3ff30388ae1dd5db06e332c215fea2 (patch) | |
| tree | cfea745b79f58bad9266ddcb80490be166a45f5d /src/libsyntax/util | |
| parent | 2a72099063b21abc84145960a14224458b6dc37c (diff) | |
| download | rust-7f99a02ddb3ff30388ae1dd5db06e332c215fea2.tar.gz rust-7f99a02ddb3ff30388ae1dd5db06e332c215fea2.zip | |
syntax: Remove uses of DVec
Diffstat (limited to 'src/libsyntax/util')
| -rw-r--r-- | src/libsyntax/util/interner.rs | 7 |
1 files changed, 3 insertions, 4 deletions
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<T> { priv map: @mut LinearMap<T, uint>, - priv vect: DVec<T>, + priv vect: @mut ~[T], } // when traits can extend traits, we should extend index<uint,T> to get [] @@ -26,7 +25,7 @@ pub impl<T:Eq + IterBytes + Hash + Const + Copy> Interner<T> { static fn new() -> Interner<T> { Interner { map: @mut LinearMap::new(), - vect: DVec(), + vect: @mut ~[], } } @@ -58,7 +57,7 @@ pub impl<T:Eq + IterBytes + Hash + Const + Copy> Interner<T> { // 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() } } |
