builtin: remove unnecessary casts for defunct small unsigned warning (#14108)

Nick Treleaven 2022-04-20 19:47:09 +01:00 committed by Jef Roosens
parent 1a76b50004
commit 47ae5a93d4
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
3 changed files with 5 additions and 5 deletions

View File

@ -775,7 +775,7 @@ fn test_byte_keys() {
m[i]++
assert m[i] == i + 1
}
assert m.len == int(byte_max)
assert m.len == byte_max
keys := m.keys()
for i in u8(0) .. byte_max {
assert keys[i] == i
@ -827,7 +827,7 @@ fn test_u16_keys() {
m[i]++
assert m[i] == i + 1
}
assert m.len == int(end)
assert m.len == end
keys := m.keys()
for i in u16(0) .. end {
assert keys[i] == i

View File

@ -763,7 +763,7 @@ fn test_byte_keys() {
m[i]++
assert m[i] == i + 1
}
assert m.len == int(byte_max)
assert m.len == byte_max
keys := m.keys()
for i in u8(0) .. byte_max {
assert keys[i] == i
@ -815,7 +815,7 @@ fn test_u16_keys() {
m[i]++
assert m[i] == i + 1
}
assert m.len == int(end)
assert m.len == end
keys := m.keys()
for i in u16(0) .. end {
assert keys[i] == i

View File

@ -1937,7 +1937,7 @@ pub fn (name string) match_glob(pattern string) bool {
mut is_inverted := false
mut inner_match := false
mut inner_idx := bstart + 1
mut inner_c := u8(0)
mut inner_c := 0
if inner_idx < plen {
inner_c = pattern[inner_idx]
if inner_c == `^` {