encoding.base32: fix warning of implicit clone of array, by using an explicit unsafe block (#21728)

This commit is contained in:
Mike Ward 2024-06-25 00:17:29 -05:00 committed by GitHub
parent c5c49d3685
commit e1d23429c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -286,7 +286,9 @@ fn (enc &Encoding) decode_(src_ []u8, mut dst []u8) !(int, bool) {
break
}
in0 := src[0]
src = src[1..]
unsafe {
src = src[1..]
}
if in0 == enc.padding_char && j >= 2 && src.len < 8 {
// We`ve reached the end and there`s padding
if src.len + j < 8 - 1 {