Merge pull request #470 from nodir-t/master

Remove `Implementing the Default trait` book section
This commit is contained in:
Niko Matsakis 2024-03-11 09:57:33 +00:00 committed by GitHub
commit c38077fb6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,14 +35,6 @@ If you want to permit accessing your database from multiple threads at once, the
{{#include ../../../examples-2022/calc/src/db.rs:par_db_impl}}
```
## Implementing the `Default` trait
It's not required, but implementing the `Default` trait is often a convenient way to let users instantiate your database:
```rust
{{#include ../../../examples-2022/calc/src/db.rs:default_impl}}
```
## Implementing the traits for each jar
The `Database` struct also needs to implement the [database traits for each jar](./jar.md#database-trait-for-the-jar).