Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/lib.rs')
-rw-r--r--crates/ide/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs
index e7f5fcbf69..aa525a8612 100644
--- a/crates/ide/src/lib.rs
+++ b/crates/ide/src/lib.rs
@@ -182,7 +182,7 @@ impl AnalysisHost {
/// Returns a snapshot of the current state, which you can query for
/// semantic information.
pub fn analysis(&self) -> Analysis {
- Analysis { db: self.db.snapshot() }
+ Analysis { db: self.db.clone() }
}
/// Applies changes to the current state of the world. If there are
@@ -864,7 +864,7 @@ impl Analysis {
where
F: FnOnce(&RootDatabase) -> T + std::panic::UnwindSafe,
{
- let snap = self.db.snapshot();
+ let snap = self.db.clone();
Cancelled::catch(|| f(&snap))
}
}