Skip to content

Commit

Permalink
Conditionally compile String and Vec impls
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Mar 6, 2016
1 parent ae820e6 commit 8105ae8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions phf_shared/src/lib.rs
Expand Up @@ -60,13 +60,15 @@ pub trait PhfHash {
}
}

#[cfg(not(feature = "core"))]
impl PhfHash for String {
#[inline]
fn phf_hash<H: Hasher>(&self, state: &mut H) {
(**self).phf_hash(state)
}
}

#[cfg(not(feature = "core"))]
impl PhfHash for Vec<u8> {
#[inline]
fn phf_hash<H: Hasher>(&self, state: &mut H) {
Expand Down

0 comments on commit 8105ae8

Please sign in to comment.