From 58dfc05a7d27ac506016186970b4f3697c1c6475 Mon Sep 17 00:00:00 2001 From: Christopher Speck Date: Thu, 17 Dec 2020 20:21:57 -0500 Subject: [PATCH] Allow using the owned `String` type for `phf` dynamic code generation. 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 --- phf_shared/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/phf_shared/src/lib.rs b/phf_shared/src/lib.rs index 7e1efdcb..3bd017b9 100644 --- a/phf_shared/src/lib.rs +++ b/phf_shared/src/lib.rs @@ -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]