More useful Debug for Symbol
Fixes #26.
diff --git a/src/stable.rs b/src/stable.rs
index 26b2686..a6daf84 100644
--- a/src/stable.rs
+++ b/src/stable.rs
@@ -146,7 +146,7 @@
}
}
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Clone)]
pub struct Symbol {
intern: usize,
not_send_sync: PhantomData<*const ()>,
@@ -177,6 +177,12 @@
}
}
+impl fmt::Debug for Symbol {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ f.debug_tuple("Symbol").field(&&**self).finish()
+ }
+}
+
struct Interner {
string_to_index: HashMap<MyRc, usize>,
index_to_string: Vec<Rc<String>>,