diff options
Diffstat (limited to 'crates/ra_analysis/src/db.rs')
-rw-r--r-- | crates/ra_analysis/src/db.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index 0773edcc1..c69577233 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs | |||
@@ -30,6 +30,20 @@ impl salsa::Database for RootDatabase { | |||
30 | } | 30 | } |
31 | } | 31 | } |
32 | 32 | ||
33 | impl salsa::ParallelDatabase for RootDatabase { | ||
34 | fn fork(&self) -> Self { | ||
35 | RootDatabase { | ||
36 | runtime: self.runtime.fork(), | ||
37 | } | ||
38 | } | ||
39 | } | ||
40 | |||
41 | impl Clone for RootDatabase { | ||
42 | fn clone(&self) -> RootDatabase { | ||
43 | salsa::ParallelDatabase::fork(self) | ||
44 | } | ||
45 | } | ||
46 | |||
33 | salsa::database_storage! { | 47 | salsa::database_storage! { |
34 | pub(crate) struct RootDatabaseStorage for RootDatabase { | 48 | pub(crate) struct RootDatabaseStorage for RootDatabase { |
35 | impl FilesDatabase { | 49 | impl FilesDatabase { |