actix-router: fix from_hex error

This commit is contained in:
nujz 2020-09-19 18:27:47 +08:00
parent fb0aa02b3c
commit 7224a3ac78
1 changed files with 1 additions and 1 deletions

View File

@ -186,7 +186,7 @@ fn from_hex(v: u8) -> Option<u8> {
Some(v - 0x30) // ord('0') == 0x30
} else if v >= b'A' && v <= b'F' {
Some(v - 0x41 + 10) // ord('A') == 0x41
} else if v > b'a' && v <= b'f' {
} else if v >= b'a' && v <= b'f' {
Some(v - 0x61 + 10) // ord('a') == 0x61
} else {
None