aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/test_db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/test_db.rs')
-rw-r--r--crates/hir_ty/src/test_db.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_ty/src/test_db.rs b/crates/hir_ty/src/test_db.rs
index 15b8435e9..22254b765 100644
--- a/crates/hir_ty/src/test_db.rs
+++ b/crates/hir_ty/src/test_db.rs
@@ -21,7 +21,7 @@ use test_utils::extract_annotations;
21 crate::db::HirDatabaseStorage 21 crate::db::HirDatabaseStorage
22)] 22)]
23#[derive(Default)] 23#[derive(Default)]
24pub struct TestDB { 24pub(crate) struct TestDB {
25 storage: salsa::Storage<TestDB>, 25 storage: salsa::Storage<TestDB>,
26 events: Mutex<Option<Vec<salsa::Event>>>, 26 events: Mutex<Option<Vec<salsa::Event>>>,
27} 27}
@@ -113,13 +113,13 @@ impl TestDB {
113} 113}
114 114
115impl TestDB { 115impl TestDB {
116 pub fn log(&self, f: impl FnOnce()) -> Vec<salsa::Event> { 116 pub(crate) fn log(&self, f: impl FnOnce()) -> Vec<salsa::Event> {
117 *self.events.lock().unwrap() = Some(Vec::new()); 117 *self.events.lock().unwrap() = Some(Vec::new());
118 f(); 118 f();
119 self.events.lock().unwrap().take().unwrap() 119 self.events.lock().unwrap().take().unwrap()
120 } 120 }
121 121
122 pub fn log_executed(&self, f: impl FnOnce()) -> Vec<String> { 122 pub(crate) fn log_executed(&self, f: impl FnOnce()) -> Vec<String> {
123 let events = self.log(f); 123 let events = self.log(f);
124 events 124 events
125 .into_iter() 125 .into_iter()