Implement Display formatter in terms of Debug

This commit is contained in:
Patrick Lühne 2019-11-02 04:05:57 +01:00
parent a6fe4b9e08
commit de4ab29da5
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -72,13 +72,7 @@ impl std::fmt::Display for crate::VariableDeclaration
{ {
fn fmt(&self, format: &mut std::fmt::Formatter) -> std::fmt::Result fn fmt(&self, format: &mut std::fmt::Formatter) -> std::fmt::Result
{ {
match &self.domain write!(format, "{:?}", &self)
{
crate::Domain::Program => write!(format, "X")?,
crate::Domain::Integer => write!(format, "N")?,
};
write!(format, "{}", &self.name)
} }
} }