From 0b68ea538639ebbdae032c9c3abefe547a60e982 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Mon, 30 Mar 2015 21:08:47 -0700 Subject: [PATCH] Drop debug_builders feature --- phf/Cargo.toml | 6 +++--- phf/src/lib.rs | 3 ++- phf/src/map.rs | 3 ++- phf/src/ordered_map.rs | 3 ++- phf/src/ordered_set.rs | 3 ++- phf/src/set.rs | 3 ++- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/phf/Cargo.toml b/phf/Cargo.toml index 9ee41d65..68abadd1 100644 --- a/phf/Cargo.toml +++ b/phf/Cargo.toml @@ -12,6 +12,6 @@ name = "phf" path = "src/lib.rs" test = false -[dependencies.phf_shared] -path = "../phf_shared" -version = "=0.6.19" +[dependencies] +debug-builders = "0.1" +phf_shared = { version = "=0.6.19", path = "../phf_shared" } diff --git a/phf/src/lib.rs b/phf/src/lib.rs index 5fad1457..42bf96b9 100644 --- a/phf/src/lib.rs +++ b/phf/src/lib.rs @@ -4,9 +4,10 @@ //! `phf_macros` crate or via code generation in the `phf_codegen` crate. See //! the documentation of those crates for more details. #![doc(html_root_url="https://sfackler.github.io/rust-phf/doc")] -#![feature(core, debug_builders)] +#![feature(core)] #![warn(missing_docs)] +extern crate debug_builders; extern crate phf_shared; pub use phf_shared::PhfHash; diff --git a/phf/src/map.rs b/phf/src/map.rs index c5ba2e5b..44555f8c 100644 --- a/phf/src/map.rs +++ b/phf/src/map.rs @@ -1,4 +1,5 @@ //! An immutable map constructed at compile time. +use debug_builders::DebugMap; use std::prelude::v1::*; use std::borrow::Borrow; use std::ops::Index; @@ -26,7 +27,7 @@ pub struct Map { impl fmt::Debug for Map where K: fmt::Debug, V: fmt::Debug { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - self.entries().fold(fmt.debug_map(), |b, (k, v)| b.entry(k, v)).finish() + self.entries().fold(DebugMap::new(fmt), |b, (k, v)| b.entry(k, v)).finish() } } diff --git a/phf/src/ordered_map.rs b/phf/src/ordered_map.rs index f85322c4..5fd266a8 100644 --- a/phf/src/ordered_map.rs +++ b/phf/src/ordered_map.rs @@ -1,4 +1,5 @@ //! An order-preserving immutable map constructed at compile time. +use debug_builders::DebugMap; use std::prelude::v1::*; use std::borrow::Borrow; use std::iter::{IntoIterator, RandomAccessIterator}; @@ -32,7 +33,7 @@ pub struct OrderedMap { impl fmt::Debug for OrderedMap where K: fmt::Debug, V: fmt::Debug { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - self.entries().fold(fmt.debug_map(), |b, (k, v)| b.entry(k, v)).finish() + self.entries().fold(DebugMap::new(fmt), |b, (k, v)| b.entry(k, v)).finish() } } diff --git a/phf/src/ordered_set.rs b/phf/src/ordered_set.rs index 0baf8959..75ebe052 100644 --- a/phf/src/ordered_set.rs +++ b/phf/src/ordered_set.rs @@ -1,4 +1,5 @@ //! An order-preserving immutable set constructed at compile time. +use debug_builders::DebugSet; use std::prelude::v1::*; use std::borrow::Borrow; use std::iter::{IntoIterator, RandomAccessIterator}; @@ -23,7 +24,7 @@ pub struct OrderedSet { impl fmt::Debug for OrderedSet where T: fmt::Debug { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - self.iter().fold(fmt.debug_set(), |b, e| b.entry(e)).finish() + self.iter().fold(DebugSet::new(fmt), |b, e| b.entry(e)).finish() } } diff --git a/phf/src/set.rs b/phf/src/set.rs index 66bc1ed5..6612b554 100644 --- a/phf/src/set.rs +++ b/phf/src/set.rs @@ -1,4 +1,5 @@ //! An immutable set constructed at compile time. +use debug_builders::DebugSet; use std::prelude::v1::*; use std::borrow::Borrow; use std::iter::IntoIterator; @@ -22,7 +23,7 @@ pub struct Set { impl fmt::Debug for Set where T: fmt::Debug { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - self.iter().fold(fmt.debug_set(), |b, e| b.entry(e)).finish() + self.iter().fold(DebugSet::new(fmt), |b, e| b.entry(e)).finish() } }