Skip to content

Commit

Permalink
Allow using the owned String type for phf dynamic code generation.
Browse files Browse the repository at this point in the history
In version 0.7 of `phf` the owned `String` type could be used but with
changes in 0.8 this is no longer possible without this implementation of
`FmtConst` for `String`.

This is a minimal change of #185, as that pull request is remaining
opened with outstanding comments.

Co-authored-by: Yuki Okushi <jtitor@2k36.org>
  • Loading branch information
neandrake and JohnTitor committed Jun 7, 2021
1 parent a47ac36 commit 58dfc05
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions phf_shared/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ delegate_debug!(u128);
delegate_debug!(i128);
delegate_debug!(bool);

#[cfg(feature = "std")]
delegate_debug!(String);

#[cfg(feature = "std")]
impl PhfHash for String {
#[inline]
Expand Down

0 comments on commit 58dfc05

Please sign in to comment.