Display for Atom
diff --git a/syntax/atom.rs b/syntax/atom.rs
index 5b20c4c..a2ff7b7 100644
--- a/syntax/atom.rs
+++ b/syntax/atom.rs
@@ -1,5 +1,6 @@
use crate::syntax::Type;
use proc_macro2::Ident;
+use std::fmt::{self, Display};
#[derive(Copy, Clone, PartialEq)]
pub enum Atom {
@@ -44,6 +45,12 @@
}
}
+impl Display for Atom {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ formatter.write_str(self.as_ref())
+ }
+}
+
impl AsRef<str> for Atom {
fn as_ref(&self) -> &str {
use self::Atom::*;