Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ognevny committed Feb 13, 2024
1 parent 922261a commit 3880e8a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/num/radix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1170,11 +1170,11 @@ impl StringRadix {
pub fn from_radix(number: &str, base: u8) -> Result<Self, RadixError> {
match base {
0 | 1 | 37.. => Err(RadixError::BaseError(36, base)),
_ => {
RADIX.iter().skip(base.into()).find_map(|&i|
number.contains(i).then(|| Err(RadixError::NumberError(i, base)))
).map_or(Ok(Self { number: number.to_owned(), base }), |err| err)
},
_ => RADIX
.iter()
.skip(base.into())
.find_map(|&i| number.contains(i).then(|| Err(RadixError::NumberError(i, base))))
.map_or(Ok(Self { number: number.to_owned(), base }), |err| err),
}
}

Expand Down

0 comments on commit 3880e8a

Please sign in to comment.