Fix storage examples

This commit is contained in:
Brian Anderson 2022-08-05 12:17:22 -06:00
parent 8a06de0610
commit 7e72c0c3df
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -67,7 +67,7 @@ pub trait ParallelDatabase: Database + Send {
/// fn snapshot(&self) -> Snapshot<Self> {
/// Snapshot::new(
/// MyDatabaseType {
/// runtime: self.runtime.snapshot(self),
/// runtime: self.storage.snapshot(),
/// other_field: self.other_field.clone(),
/// }
/// )