Skip to content

Commit

Permalink
Auto merge of #9 - servo:doctest, r=Wafflespeanut
Browse files Browse the repository at this point in the history
Update doctests.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/rust-fnv/9)
<!-- Reviewable:end -->
  • Loading branch information
bors-servo committed Mar 4, 2016
2 parents 57970f8 + 8c10781 commit 58b5139
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ documentation = "https://doc.servo.org/fnv/"
[lib]
name = "fnv"
path = "lib.rs"
doctest = false
14 changes: 6 additions & 8 deletions lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@
//! map using this state with `HashMap::with_hash_state`. A full example:
//!
//! ```rust
//! #![feature(hashmap_hasher)]
//! use std::collections::HashMap;
//! use std::collections::hash_state::DefaultState;
//! use std::hash::BuildHasherDefault;
//! use fnv::FnvHasher;
//!
//! let fnv = DefaultState::<FnvHasher>::default();
//! let mut map = HashMap::with_hash_state(fnv);
//! let fnv = BuildHasherDefault::<FnvHasher>::default();
//! let mut map = HashMap::with_hasher(fnv);
//! map.insert(1, "one");
//! map.insert(2, "two");
//! ```
Expand All @@ -47,13 +46,12 @@
//! with the same mechanism.
//!
//! ```rust
//! #![feature(hashmap_hasher)]
//! use std::collections::HashSet;
//! use std::collections::hash_state::DefaultState;
//! use std::hash::BuildHasherDefault;
//! use fnv::FnvHasher;
//!
//! let fnv = DefaultState::<FnvHasher>::default();
//! let mut set = HashSet::with_hash_state(fnv);
//! let fnv = BuildHasherDefault::<FnvHasher>::default();
//! let mut set = HashSet::with_hasher(fnv);
//! set.insert(1);
//! set.insert(2);
//! ```
Expand Down

0 comments on commit 58b5139

Please sign in to comment.