1
0
Fork 0

impl TryFrom<Setup> for Position

This commit is contained in:
Paul-Nicolas Madelaine 2025-10-23 23:34:31 +02:00
parent 6f409799db
commit d8f9be3b2c

View file

@ -416,6 +416,14 @@ impl Setup {
}
}
impl TryFrom<Setup> for Position {
type Error = IllegalPosition;
#[inline]
fn try_from(setup: Setup) -> Result<Self, Self::Error> {
setup.into_position()
}
}
impl std::fmt::Debug for Setup {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
f.debug_tuple("Setup").field(&self.to_string()).finish()