1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use crate::BinaryOp;
use crate::BinaryOp::*;
use std::fmt::{Display, Error, Formatter};
impl Display for BinaryOp {
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> {
let symbol = match self {
And => "&",
Or => "|",
Xor => "^",
Imp => "=>",
Iff => "<=>",
};
write!(f, "{}", symbol)
}
}