builtin: fix typo in array.v (#14688)

master
Ikko Ashimine 2022-06-06 00:49:40 +09:00 committed by GitHub
parent b000728845
commit 7b25957a26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -614,7 +614,7 @@ fn (mut a array) set_unsafe(i int, val voidptr) {
unsafe { vmemcpy(&u8(a.data) + u64(a.element_size) * u64(i), val, a.element_size) } unsafe { vmemcpy(&u8(a.data) + u64(a.element_size) * u64(i), val, a.element_size) }
} }
// Private function. Used to implement assigment to the array element. // Private function. Used to implement assignment to the array element.
fn (mut a array) set(i int, val voidptr) { fn (mut a array) set(i int, val voidptr) {
$if !no_bounds_checking ? { $if !no_bounds_checking ? {
if i < 0 || i >= a.len { if i < 0 || i >= a.len {