impl TryFrom<Setup> for Position
This commit is contained in:
parent
6f409799db
commit
d8f9be3b2c
1 changed files with 8 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue