mirror of https://github.com/fafhrd91/actix-net
actix-router: fix from_hex error
This commit is contained in:
parent
fb0aa02b3c
commit
7224a3ac78
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue