Fixes and improvements courtesy of Daan (black-puppydog) #6

Merged
glyph merged 13 commits from black_puppydog_fixes into main 2022-10-02 16:43:03 +00:00
1 changed files with 8 additions and 1 deletions
Showing only changes of commit 3946f2f7dc - Show all commits

View File

@ -62,7 +62,14 @@ impl Database {
}
```
The initialisation method requires a `Path` in order to open / create the database. We can use the [xdg](https://crates.io/crates/xdg) crate to generate a path using the XDG Base Directory specification. Open `src/main.rs` and add the following code:
The initialisation method requires a `Path` in order to open / create the database. We can use the [xdg](https://crates.io/crates/xdg) crate to generate a path using the XDG Base Directory specification. Add the dependencies for `sled` and `xdg` to `Cargo.toml`:
```toml
sled = "0.34"
xdg = "2.4.1"
```
Now open `src/main.rs` and add the following code:
```rust
mod db;