Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Drop debug_builders feature
  • Loading branch information
sfackler committed Mar 31, 2015
1 parent 5810d30 commit 0b68ea5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
6 changes: 3 additions & 3 deletions phf/Cargo.toml
Expand Up @@ -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" }
3 changes: 2 additions & 1 deletion phf/src/lib.rs
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion 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;
Expand Down Expand Up @@ -26,7 +27,7 @@ pub struct Map<K:'static, V:'static> {

impl<K, V> fmt::Debug for Map<K, V> 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()
}
}

Expand Down
3 changes: 2 additions & 1 deletion 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};
Expand Down Expand Up @@ -32,7 +33,7 @@ pub struct OrderedMap<K:'static, V:'static> {

impl<K, V> fmt::Debug for OrderedMap<K, V> 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()
}
}

Expand Down
3 changes: 2 additions & 1 deletion 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};
Expand All @@ -23,7 +24,7 @@ pub struct OrderedSet<T:'static> {

impl<T> fmt::Debug for OrderedSet<T> 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()
}
}

Expand Down
3 changes: 2 additions & 1 deletion 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;
Expand All @@ -22,7 +23,7 @@ pub struct Set<T:'static> {

impl<T> fmt::Debug for Set<T> 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()
}
}

Expand Down

0 comments on commit 0b68ea5

Please sign in to comment.