diff --git a/book/src/tutorial/db.md b/book/src/tutorial/db.md index c48e61d..fe55d7c 100644 --- a/book/src/tutorial/db.md +++ b/book/src/tutorial/db.md @@ -33,7 +33,7 @@ In addition to the struct itself, we must add an impl of `salsa::Database`: If you want to permit accessing your database from multiple threads at once, then you also need to implement the `ParallelDatabase` trait: ```rust -{{#include ../../../calc-example/calc/src/db.rs:db_impl}} +{{#include ../../../calc-example/calc/src/db.rs:par_db_impl}} ``` ## Implementing the `Default` trait diff --git a/components/salsa-2022/src/database.rs b/components/salsa-2022/src/database.rs index dbd4c44..fd6b1b7 100644 --- a/components/salsa-2022/src/database.rs +++ b/components/salsa-2022/src/database.rs @@ -67,7 +67,7 @@ pub trait ParallelDatabase: Database + Send { /// fn snapshot(&self) -> Snapshot { /// Snapshot::new( /// MyDatabaseType { - /// runtime: self.runtime.snapshot(self), + /// runtime: self.storage.snapshot(), /// other_field: self.other_field.clone(), /// } /// )