add brackets to match for clippy
This commit is contained in:
parent
4f1a28acf8
commit
5e5a29b3a1
1 changed files with 2 additions and 2 deletions
|
|
@ -25,12 +25,12 @@ fn parse_coordinate(string: &str) -> io::Result<Coordinate> {
|
||||||
type HexChar = u8;
|
type HexChar = u8;
|
||||||
|
|
||||||
fn val(c1: u8, c2: u8) -> io::Result<HexChar> {
|
fn val(c1: u8, c2: u8) -> io::Result<HexChar> {
|
||||||
Ok((match c1 {
|
Ok(((match c1 {
|
||||||
b'A'..=b'F' => c1 - b'A' + 10,
|
b'A'..=b'F' => c1 - b'A' + 10,
|
||||||
b'a'..=b'f' => c1 - b'a' + 10,
|
b'a'..=b'f' => c1 - b'a' + 10,
|
||||||
b'0'..=b'9' => c1 - b'0',
|
b'0'..=b'9' => c1 - b'0',
|
||||||
_ => return Err(Error::from(ErrorKind::InvalidInput)),
|
_ => return Err(Error::from(ErrorKind::InvalidInput)),
|
||||||
}) << 4
|
}) << 4)
|
||||||
| (match c2 {
|
| (match c2 {
|
||||||
b'A'..=b'F' => c2 - b'A' + 10,
|
b'A'..=b'F' => c2 - b'A' + 10,
|
||||||
b'a'..=b'f' => c2 - b'a' + 10,
|
b'a'..=b'f' => c2 - b'a' + 10,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue