mirror of
https://github.com/vlang/v.git
synced 2025-09-15 15:32:27 +03:00
encoding.base32: fix warning of implicit clone of array, by using an explicit unsafe block (#21728)
This commit is contained in:
parent
c5c49d3685
commit
e1d23429c7
1 changed files with 3 additions and 1 deletions
|
@ -286,7 +286,9 @@ fn (enc &Encoding) decode_(src_ []u8, mut dst []u8) !(int, bool) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
in0 := src[0]
|
in0 := src[0]
|
||||||
src = src[1..]
|
unsafe {
|
||||||
|
src = src[1..]
|
||||||
|
}
|
||||||
if in0 == enc.padding_char && j >= 2 && src.len < 8 {
|
if in0 == enc.padding_char && j >= 2 && src.len < 8 {
|
||||||
// We`ve reached the end and there`s padding
|
// We`ve reached the end and there`s padding
|
||||||
if src.len + j < 8 - 1 {
|
if src.len + j < 8 - 1 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue