1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: byte => u8

This commit is contained in:
Alexander Medvednikov
2022-04-15 14:58:56 +03:00
parent b49d873217
commit d4a0d6f73c
221 changed files with 1365 additions and 1365 deletions

View File

@ -54,9 +54,9 @@ pub fn encode(bytes []byte) string {
// char2nibble converts an ASCII hex character to it's hex value
fn char2nibble(b byte) ?byte {
match b {
`0`...`9` { return b - byte(`0`) }
`A`...`F` { return b - byte(`A`) + 10 }
`a`...`f` { return b - byte(`a`) + 10 }
`0`...`9` { return b - u8(`0`) }
`A`...`F` { return b - u8(`A`) + 10 }
`a`...`f` { return b - u8(`a`) + 10 }
else { return error('invalid hex char $b.ascii_str()') }
}
}