delegate impl Debug for ImmutableString
@@ -9,7 +9,7 @@ use crate::{
};
use fxhash::{FxHashMap, FxHasher};
use std::{
- fmt::{Display, Formatter},
+ fmt::{Debug, Display, Formatter},
hash::{Hash, Hasher},
ops::Deref,
sync::Arc,
@@ -32,7 +32,7 @@ struct State {
/// # Use cases
///
/// Most common use case for immutable strings is hash map keys in performance-critical places.
-#[derive(Clone, Debug)]
+#[derive(Clone)]
pub struct ImmutableString(Arc<State>);
impl Display for ImmutableString {
@@ -41,6 +41,12 @@ impl Display for ImmutableString {
}
}
+impl Debug for ImmutableString {
+ fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
+ Debug::fmt(&self.0.string, f)
+ }
+}
+
impl Visit for ImmutableString {
fn visit(&mut self, name: &str, visitor: &mut Visitor) -> VisitResult {
// Serialize/deserialize as ordinary string.
