Derive Debug for Ident/Span
Now that under the hood they implement Debug
diff --git a/src/ident.rs b/src/ident.rs
index dcd8dd1..181bac9 100644
--- a/src/ident.rs
+++ b/src/ident.rs
@@ -8,7 +8,7 @@
use Span;
use tokens;
-#[derive(Clone)]
+#[derive(Clone, Debug)]
pub struct Ident {
pub sym: Symbol,
pub span: Span,
@@ -77,12 +77,6 @@
}
}
-impl fmt::Debug for Ident {
- fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
- fmt::Debug::fmt(self.sym.as_str(), formatter)
- }
-}
-
impl<T: ?Sized> PartialEq<T> for Ident
where T: AsRef<str>
{
diff --git a/synom/src/span.rs b/synom/src/span.rs
index a652c41..933d4c3 100644
--- a/synom/src/span.rs
+++ b/synom/src/span.rs
@@ -1,9 +1,8 @@
use std::hash::{Hash, Hasher};
-use std::fmt;
use proc_macro2;
-#[derive(Clone, Copy, Default)]
+#[derive(Clone, Copy, Default, Debug)]
pub struct Span(pub proc_macro2::Span);
impl PartialEq for Span {
@@ -18,10 +17,3 @@
fn hash<H: Hasher>(&self, _hasher: &mut H) {
}
}
-
-impl fmt::Debug for Span {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.debug_struct("Span")
- .finish()
- }
-}