mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vlib: add mut
for the first parameter of builtin.copy, arrays.copy and crypto (#13702)
This commit is contained in:
@ -816,7 +816,7 @@ pub fn (b []byte) hex() string {
|
||||
// Returns the number of elements copied.
|
||||
// NOTE: This is not an `array` method. It is a function that takes two arrays of bytes.
|
||||
// See also: `arrays.copy`.
|
||||
pub fn copy(dst []byte, src []byte) int {
|
||||
pub fn copy(mut dst []byte, src []byte) int {
|
||||
min := if dst.len < src.len { dst.len } else { src.len }
|
||||
if min > 0 {
|
||||
unsafe { vmemmove(&byte(dst.data), src.data, min) }
|
||||
|
Reference in New Issue
Block a user