diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-09-29 20:23:15 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-09-29 20:23:15 +0100 |
commit | 80b0b0ea03a36451210c6f1beec66aa1150f194f (patch) | |
tree | c5a634e9836978c0fbb679c2529eea518add1196 /crates/ide_db/src/lib.rs | |
parent | 7283783b98ed61ee4f94961b81ad06e2344098d2 (diff) | |
parent | e7df0ad2fb48166937fdd061e1ae559c72a81990 (diff) |
Merge #6095
6095: Remove periodic gc stub r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide_db/src/lib.rs')
-rw-r--r-- | crates/ide_db/src/lib.rs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/crates/ide_db/src/lib.rs b/crates/ide_db/src/lib.rs index 70ada02f3..0d209c6ec 100644 --- a/crates/ide_db/src/lib.rs +++ b/crates/ide_db/src/lib.rs | |||
@@ -10,7 +10,6 @@ pub mod defs; | |||
10 | pub mod search; | 10 | pub mod search; |
11 | pub mod imports_locator; | 11 | pub mod imports_locator; |
12 | pub mod source_change; | 12 | pub mod source_change; |
13 | mod wasm_shims; | ||
14 | 13 | ||
15 | use std::{fmt, sync::Arc}; | 14 | use std::{fmt, sync::Arc}; |
16 | 15 | ||
@@ -36,8 +35,6 @@ use crate::{line_index::LineIndex, symbol_index::SymbolsDatabase}; | |||
36 | )] | 35 | )] |
37 | pub struct RootDatabase { | 36 | pub struct RootDatabase { |
38 | storage: salsa::Storage<RootDatabase>, | 37 | storage: salsa::Storage<RootDatabase>, |
39 | pub last_gc: crate::wasm_shims::Instant, | ||
40 | pub last_gc_check: crate::wasm_shims::Instant, | ||
41 | } | 38 | } |
42 | 39 | ||
43 | impl fmt::Debug for RootDatabase { | 40 | impl fmt::Debug for RootDatabase { |
@@ -99,11 +96,7 @@ impl Default for RootDatabase { | |||
99 | 96 | ||
100 | impl RootDatabase { | 97 | impl RootDatabase { |
101 | pub fn new(lru_capacity: Option<usize>) -> RootDatabase { | 98 | pub fn new(lru_capacity: Option<usize>) -> RootDatabase { |
102 | let mut db = RootDatabase { | 99 | let mut db = RootDatabase { storage: salsa::Storage::default() }; |
103 | storage: salsa::Storage::default(), | ||
104 | last_gc: crate::wasm_shims::Instant::now(), | ||
105 | last_gc_check: crate::wasm_shims::Instant::now(), | ||
106 | }; | ||
107 | db.set_crate_graph_with_durability(Default::default(), Durability::HIGH); | 100 | db.set_crate_graph_with_durability(Default::default(), Durability::HIGH); |
108 | db.set_local_roots_with_durability(Default::default(), Durability::HIGH); | 101 | db.set_local_roots_with_durability(Default::default(), Durability::HIGH); |
109 | db.set_library_roots_with_durability(Default::default(), Durability::HIGH); | 102 | db.set_library_roots_with_durability(Default::default(), Durability::HIGH); |
@@ -121,11 +114,7 @@ impl RootDatabase { | |||
121 | 114 | ||
122 | impl salsa::ParallelDatabase for RootDatabase { | 115 | impl salsa::ParallelDatabase for RootDatabase { |
123 | fn snapshot(&self) -> salsa::Snapshot<RootDatabase> { | 116 | fn snapshot(&self) -> salsa::Snapshot<RootDatabase> { |
124 | salsa::Snapshot::new(RootDatabase { | 117 | salsa::Snapshot::new(RootDatabase { storage: self.storage.snapshot() }) |
125 | storage: self.storage.snapshot(), | ||
126 | last_gc: self.last_gc, | ||
127 | last_gc_check: self.last_gc_check, | ||
128 | }) | ||
129 | } | 118 | } |
130 | } | 119 | } |
131 | 120 | ||