Skip to content

Commit

Permalink
Include README as a crate level documentation
Browse files Browse the repository at this point in the history
Additionally suggest `cargo add` which will always resolve to the latest
version of `retainer`.

Including README this way will make the README example run during unit
testing phase.

Fixes: #11
  • Loading branch information
wiktor-k authored and whitfin committed May 1, 2024
1 parent 2ac57e1 commit 5b114fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ improvements and I'll get to them as soon as possible :).
### Getting Started

This crate is available on [crates.io](https://crates.io/crates/retainer). The
easiest way to use it is to add an entry to your `Cargo.toml` defining the dependency:
easiest way to use it is to add an entry to your `Cargo.toml` defining the dependency
using `cargo add`:

```toml
[dependencies]
retainer = "0.3"
```sh
$ cargo add retainer
```

### Basic Usage
Expand Down
6 changes: 1 addition & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
//! Very small caching utility with async locking support.
//!
//! All interaction in this crate will be done through the `Cache` type,
//! so please see the the `cache` module for further instructions.
#![doc(html_root_url = "https://docs.rs/retainer/0.3.0")]
#![doc = include_str!("../README.md")]

// exposed modules
pub mod cache;
Expand Down

0 comments on commit 5b114fc

Please sign in to comment.