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

master
Nick Treleaven 2022-04-20 19:47:09 +01:00 committed by GitHub
parent 0260c2a552
commit 1533b77404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 == `^` {