Skip to content

Commit

Permalink
Implementing the Default trait
Browse files Browse the repository at this point in the history
  • Loading branch information
nodir-t authored Jan 9, 2024
1 parent f1d318a commit eeac4f8
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions book/src/tutorial/db.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit eeac4f8

Please sign in to comment.