From d8f9be3b2ce2adf304bfcca49fc8dfbe0745779f Mon Sep 17 00:00:00 2001 From: Paul-Nicolas Madelaine Date: Thu, 23 Oct 2025 23:34:31 +0200 Subject: [PATCH] impl TryFrom for Position --- src/setup.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/setup.rs b/src/setup.rs index fe5f559..d4ce6cf 100644 --- a/src/setup.rs +++ b/src/setup.rs @@ -416,6 +416,14 @@ impl Setup { } } +impl TryFrom for Position { + type Error = IllegalPosition; + #[inline] + fn try_from(setup: Setup) -> Result { + 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()