Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix feature interop with examples
  • Loading branch information
pczarn committed Nov 15, 2020
commit 0a4674086be9ba63558819374a3400b14c83c909
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ script:
- cargo run --example arena
- cargo run --example mutable_arena
- cargo run --example sync
- cargo run --example string_interner --features indexmap

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
```