diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-10-14 23:05:01 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-10-19 12:59:40 -0700 |
| commit | 9d5d97b55d6487ee23b805bc1acbaa0669b82116 (patch) | |
| tree | b72dcf7045e331e94ea0f8658d088ab42d917935 /src/libsyntax/util | |
| parent | fb169d5543c84e11038ba2d07b538ec88fb49ca6 (diff) | |
| download | rust-9d5d97b55d6487ee23b805bc1acbaa0669b82116.tar.gz rust-9d5d97b55d6487ee23b805bc1acbaa0669b82116.zip | |
Remove a large amount of deprecated functionality
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
Diffstat (limited to 'src/libsyntax/util')
| -rw-r--r-- | src/libsyntax/util/interner.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/util/small_vector.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs index c22bdde74a4..ed2455d0a30 100644 --- a/src/libsyntax/util/interner.rs +++ b/src/libsyntax/util/interner.rs @@ -67,7 +67,7 @@ impl<T: Eq + Hash + Clone + 'static> Interner<T> { pub fn get(&self, idx: Name) -> T { let vect = self.vect.borrow(); - (*(*vect).get(idx.uint())).clone() + (*vect)[idx.uint()].clone() } pub fn len(&self) -> uint { @@ -182,13 +182,13 @@ impl StrInterner { let new_idx = Name(self.len() as u32); // leave out of map to avoid colliding let mut vect = self.vect.borrow_mut(); - let existing = (*vect.get(idx.uint())).clone(); + let existing = (*vect)[idx.uint()].clone(); vect.push(existing); new_idx } pub fn get(&self, idx: Name) -> RcStr { - (*self.vect.borrow().get(idx.uint())).clone() + (*self.vect.borrow())[idx.uint()].clone() } pub fn len(&self) -> uint { diff --git a/src/libsyntax/util/small_vector.rs b/src/libsyntax/util/small_vector.rs index a3f081e7be4..60ba5f6615b 100644 --- a/src/libsyntax/util/small_vector.rs +++ b/src/libsyntax/util/small_vector.rs @@ -98,7 +98,7 @@ impl<T> SmallVector<T> { pub fn get<'a>(&'a self, idx: uint) -> &'a T { match self.repr { One(ref v) if idx == 0 => v, - Many(ref vs) => vs.get(idx), + Many(ref vs) => &vs[idx], _ => fail!("out of bounds access") } } |
