mozilla / rkv

A simple, humane, typed key-value storage solution.
https://crates.io/crates/rkv
Apache License 2.0
310 stars 53 forks source link

correct crate docs #114

Closed mykmelez closed 5 years ago

mykmelez commented 5 years ago

@ncloudioj I noticed some more outdated information in the crate docs. This branch corrects it.

Part of the problem is that the docs include an embedded code sample that itself contains embedded comments, and while the code sample itself is tested, the comments embedded inside it aren't, so it's possible for the information in them to become out-of-date.

In addition to updating those comments, I removed method names from them, as those seem like the parts of the doc that are most likely to become out-of-date. I left in data types, however, and added commentary where it seemed appropriate. I also added a bit more code to demonstrate the interaction between an active writer and a reader.

Finally, I updated the description of the E0382 error message you get when you try to reuse a committed writer, as it has changed on the latest stable Rust. And I changed "héllo, yöu" to "Héllo, wörld!" just for the fun of it.

mykmelez commented 5 years ago

Note: the docs remain inaccurate when talking about read and write transactions, as they reference the Reader and Writer types, yet those types no longer exist.

However, I suspect that we'll need to re-introduce them to resolve #115, so I won't make that change here yet.