Skip to content

Commit

Permalink
Fix feature interop with examples
Browse files Browse the repository at this point in the history
  • Loading branch information
pczarn committed Nov 15, 2020
1 parent 6a0b963 commit a38f8b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,11 @@ categories = ["data-structures", "caching"]
[dependencies]
stable_deref_trait = "1.1.1"
indexmap = { version = "1.6", optional = true }

[package.metadata.docs.rs]
features = ["indexmap"]

[[example]]
name = "string_interner"
path = "examples/string_interner.rs"
required-features = ["indexmap"]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ This crate provides various "frozen" collections.
These are append-only collections where references to entries can be held on to even across insertions. This is safe because these collections only support storing data that's present behind some indirection -- i.e. `String`, `Vec<T>`, `Box<T>`, etc, and they only yield references to the data behind the allocation (`&str`, `&[T]`, and `&T` respectively)

The typical use case is having a global cache of strings or other data which the rest of the program borrows from.

### Running all examples

```bash
cargo test --examples --features indexmap
```

0 comments on commit a38f8b2

Please sign in to comment.