From eadea0b2c2cb9e76d0be9a209819c75a41434719 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sat, 1 Nov 2014 14:25:19 -0700 Subject: [PATCH] Fix docs --- phf/src/lib.rs | 4 ++++ phf/src/map.rs | 4 +--- phf/src/ordered_map.rs | 6 ++---- phf/src/ordered_set.rs | 6 ++---- phf/src/set.rs | 4 +--- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/phf/src/lib.rs b/phf/src/lib.rs index fb18adc2..9f418651 100644 --- a/phf/src/lib.rs +++ b/phf/src/lib.rs @@ -12,9 +12,13 @@ extern crate core; extern crate collections; pub use shared::PhfHash; +#[doc(inline)] pub use map::Map; +#[doc(inline)] pub use set::Set; +#[doc(inline)] pub use ordered_map::OrderedMap; +#[doc(inline)] pub use ordered_set::OrderedSet; #[path="../../shared/mod.rs"] diff --git a/phf/src/map.rs b/phf/src/map.rs index 88a5b1d5..1dfd4fcf 100644 --- a/phf/src/map.rs +++ b/phf/src/map.rs @@ -17,9 +17,7 @@ use shared::PhfHash; /// #[phase(plugin)] /// extern crate phf_mac; /// -/// use phf::Map; -/// -/// static MY_MAP: Map<&'static str, int> = phf_map! { +/// static MY_MAP: phf::Map<&'static str, int> = phf_map! { /// "hello" => 10, /// "world" => 11, /// }; diff --git a/phf/src/ordered_map.rs b/phf/src/ordered_map.rs index 0548cef9..10dd48e6 100644 --- a/phf/src/ordered_map.rs +++ b/phf/src/ordered_map.rs @@ -9,7 +9,7 @@ use collections::Map as MapTrait; /// An order-preserving immutable map constructed at compile time. /// -/// Unlike a `PhfMap`, iteration order is guaranteed to match the definition +/// Unlike a `Map`, iteration order is guaranteed to match the definition /// order. /// /// `OrderedMap`s may be created with the `phf_ordered_map` macro: @@ -20,9 +20,7 @@ use collections::Map as MapTrait; /// #[phase(plugin)] /// extern crate phf_mac; /// -/// use phf::OrderedMap; -/// -/// static MY_MAP: OrderedMap<&'static str, int> = phf_ordered_map! { +/// static MY_MAP: phf::OrderedMap<&'static str, int> = phf_ordered_map! { /// "hello" => 10, /// "world" => 11, /// }; diff --git a/phf/src/ordered_set.rs b/phf/src/ordered_set.rs index 1f51e6a2..d59ae197 100644 --- a/phf/src/ordered_set.rs +++ b/phf/src/ordered_set.rs @@ -8,7 +8,7 @@ use collections::Set as SetTrait; /// An order-preserving immutable set constructed at compile time. /// -/// Unlike a `PhfSet`, iteration order is guaranteed to match the definition +/// Unlike a `Set`, iteration order is guaranteed to match the definition /// order. /// /// `OrderedSet`s may be created with the `phf_ordered_set` macro: @@ -19,9 +19,7 @@ use collections::Set as SetTrait; /// #[phase(plugin)] /// extern crate phf_mac; /// -/// use phf::OrderedSet; -/// -/// static MY_SET: OrderedSet<&'static str> = phf_ordered_set! { +/// static MY_SET: phf::OrderedSet<&'static str> = phf_ordered_set! { /// "hello", /// "world", /// }; diff --git a/phf/src/set.rs b/phf/src/set.rs index 8bfc5805..bd77b69c 100644 --- a/phf/src/set.rs +++ b/phf/src/set.rs @@ -17,9 +17,7 @@ use map; /// #[phase(plugin)] /// extern crate phf_mac; /// -/// use phf::Set; -/// -/// static MY_SET: Set<&'static str> = phf_set! { +/// static MY_SET: phf::Set<&'static str> = phf_set! { /// "hello", /// "world", /// };