aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_arena/src
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-08 12:53:55 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-08 12:53:55 +0000
commit6ba4fa0bc77fddf11e4938c6d79e911a91054a45 (patch)
tree49ace1774d9ed6ebfa141af27368030fa4c3279d /crates/ra_arena/src
parent5603237c069c600963b8e25481af397b25e3b185 (diff)
parentd4c8310d059e76f28c81e1e404dfe79b982bc23b (diff)
Merge #457
457: switch interner to use arena r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_arena/src')
-rw-r--r--crates/ra_arena/src/lib.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_arena/src/lib.rs b/crates/ra_arena/src/lib.rs
index 040977dc4..43bfa925a 100644
--- a/crates/ra_arena/src/lib.rs
+++ b/crates/ra_arena/src/lib.rs
@@ -61,6 +61,9 @@ pub trait ArenaId {
61} 61}
62 62
63impl<ID: ArenaId, T> Arena<ID, T> { 63impl<ID: ArenaId, T> Arena<ID, T> {
64 pub fn len(&self) -> usize {
65 self.data.len()
66 }
64 pub fn alloc(&mut self, value: T) -> ID { 67 pub fn alloc(&mut self, value: T) -> ID {
65 let id = RawId(self.data.len() as u32); 68 let id = RawId(self.data.len() as u32);
66 self.data.push(value); 69 self.data.push(value);