fix ascii methods
This commit is contained in:
parent
89e6a95ded
commit
0e65b4f927
1 changed files with 2 additions and 2 deletions
|
|
@ -128,7 +128,7 @@ impl File {
|
|||
|
||||
#[inline]
|
||||
pub fn from_char(file: char) -> Option<Self> {
|
||||
Self::from_ascii(file as u8)
|
||||
Some(Self::from_ascii(u8::try_from(file).ok()?)?)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
@ -208,7 +208,7 @@ impl Rank {
|
|||
|
||||
#[inline]
|
||||
pub fn from_char(rank: char) -> Option<Self> {
|
||||
Self::from_ascii(rank as u8)
|
||||
Some(Self::from_ascii(u8::try_from(rank).ok()?)?)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue