diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-12-21 16:35:21 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-21 16:35:21 +0000 |
commit | c59d10ab35f69d34c9e1ada34db43157467aced5 (patch) | |
tree | 2d432efaf61acd53adc8cf0f78f4ed60f1fa758c /crates/ra_hir_def/src/trace.rs | |
parent | 6d8a2ec3dd350541d7c0e5aa08795a42c4dbd8f8 (diff) | |
parent | 1a8f2aa024c6f1a5e9704c9cbd2e5a020debe2c2 (diff) |
Merge #2635
2635: Remove import source map r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src/trace.rs')
-rw-r--r-- | crates/ra_hir_def/src/trace.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/crates/ra_hir_def/src/trace.rs b/crates/ra_hir_def/src/trace.rs index 2bcd707bc..9769e88df 100644 --- a/crates/ra_hir_def/src/trace.rs +++ b/crates/ra_hir_def/src/trace.rs | |||
@@ -18,10 +18,6 @@ pub(crate) struct Trace<ID: ArenaId, T, V> { | |||
18 | } | 18 | } |
19 | 19 | ||
20 | impl<ID: ra_arena::ArenaId + Copy, T, V> Trace<ID, T, V> { | 20 | impl<ID: ra_arena::ArenaId + Copy, T, V> Trace<ID, T, V> { |
21 | pub(crate) fn new() -> Trace<ID, T, V> { | ||
22 | Trace { arena: Some(Arena::default()), map: Some(ArenaMap::default()), len: 0 } | ||
23 | } | ||
24 | |||
25 | pub(crate) fn new_for_arena() -> Trace<ID, T, V> { | 21 | pub(crate) fn new_for_arena() -> Trace<ID, T, V> { |
26 | Trace { arena: Some(Arena::default()), map: None, len: 0 } | 22 | Trace { arena: Some(Arena::default()), map: None, len: 0 } |
27 | } | 23 | } |
@@ -52,8 +48,4 @@ impl<ID: ra_arena::ArenaId + Copy, T, V> Trace<ID, T, V> { | |||
52 | pub(crate) fn into_map(mut self) -> ArenaMap<ID, V> { | 48 | pub(crate) fn into_map(mut self) -> ArenaMap<ID, V> { |
53 | self.map.take().unwrap() | 49 | self.map.take().unwrap() |
54 | } | 50 | } |
55 | |||
56 | pub(crate) fn into_arena_and_map(mut self) -> (Arena<ID, T>, ArenaMap<ID, V>) { | ||
57 | (self.arena.take().unwrap(), self.map.take().unwrap()) | ||
58 | } | ||
59 | } | 51 | } |