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

all: ~500 more byte=>u8

This commit is contained in:
Alexander Medvednikov
2022-04-15 18:25:45 +03:00
parent ae6a25f44e
commit fbb9e65c0f
148 changed files with 544 additions and 494 deletions

View File

@ -31,7 +31,7 @@ fn (mut s ChunkScanner) read_chunk_size() u32 {
return n
}
fn unhex(c byte) byte {
fn unhex(c u8) u8 {
if `0` <= c && c <= `9` {
return c - `0`
} else if `a` <= c && c <= `f` {

View File

@ -630,7 +630,7 @@ struct HeaderKeyError {
Error
code int
header string
invalid_char byte
invalid_char u8
}
pub fn (err HeaderKeyError) msg() string {
@ -662,7 +662,7 @@ fn is_valid(header string) ? {
}
// is_token checks if the byte is valid for a header token
fn is_token(b byte) bool {
fn is_token(b u8) bool {
return match b {
33, 35...39, 42, 43, 45, 46, 48...57, 65...90, 94...122, 124, 126 { true }
else { false }