Make Side printable

This commit is contained in:
Andras Schmelczer 2025-03-30 21:27:04 +01:00
parent c9c0ffecf1
commit 71ccd7b61d
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -1,4 +1,16 @@
use std::fmt::Display;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Side {
Left,
Right,
}
impl Display for Side {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Side::Left => write!(f, "Left"),
Side::Right => write!(f, "Right"),
}
}
}