diff options
author | Aleksey Kladov <[email protected]> | 2019-01-08 12:53:32 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-08 12:53:32 +0000 |
commit | d4c8310d059e76f28c81e1e404dfe79b982bc23b (patch) | |
tree | 49ace1774d9ed6ebfa141af27368030fa4c3279d /crates/ra_db/src/lib.rs | |
parent | 5603237c069c600963b8e25481af397b25e3b185 (diff) |
switch interner to use arena
Diffstat (limited to 'crates/ra_db/src/lib.rs')
-rw-r--r-- | crates/ra_db/src/lib.rs | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs index 3c41ee56d..732899718 100644 --- a/crates/ra_db/src/lib.rs +++ b/crates/ra_db/src/lib.rs | |||
@@ -18,23 +18,9 @@ pub use crate::{ | |||
18 | FileTextQuery, FileSourceRootQuery, SourceRootQuery, LocalRootsQuery, LibraryRootsQuery, CrateGraphQuery, | 18 | FileTextQuery, FileSourceRootQuery, SourceRootQuery, LocalRootsQuery, LibraryRootsQuery, CrateGraphQuery, |
19 | FileRelativePathQuery | 19 | FileRelativePathQuery |
20 | }, | 20 | }, |
21 | loc2id::{LocationIntener, NumericId}, | 21 | loc2id::LocationIntener, |
22 | }; | 22 | }; |
23 | 23 | ||
24 | #[macro_export] | ||
25 | macro_rules! impl_numeric_id { | ||
26 | ($id:ident) => { | ||
27 | impl $crate::NumericId for $id { | ||
28 | fn from_u32(id: u32) -> Self { | ||
29 | $id(id) | ||
30 | } | ||
31 | fn to_u32(self) -> u32 { | ||
32 | self.0 | ||
33 | } | ||
34 | } | ||
35 | }; | ||
36 | } | ||
37 | |||
38 | pub trait BaseDatabase: salsa::Database { | 24 | pub trait BaseDatabase: salsa::Database { |
39 | fn check_canceled(&self) -> Cancelable<()> { | 25 | fn check_canceled(&self) -> Cancelable<()> { |
40 | if self.salsa_runtime().is_current_revision_canceled() { | 26 | if self.salsa_runtime().is_current_revision_canceled() { |