Skip to content

Commit 476f15e

Browse files
committed
Revert "update to N5N3's suggestion"
This reverts commit eaaefb1.
1 parent 68e3d5e commit 476f15e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

base/abstractarray.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -915,11 +915,11 @@ end
915915
function copyto!(dest::AbstractArray, dstart::Integer, src)
916916
i = Int(dstart)
917917
if haslength(src)
918+
checkbounds(dest, i)
918919
checkbounds(dest, i + length(src) - 1)
919-
I = eachindex(dest)[i]
920-
@inbounds for x in src
921-
dest[I] = x
922-
I = nextind(dest, I)
920+
for x in src
921+
@inbounds dest[i] = x
922+
i += 1
923923
end
924924
else
925925
for x in src

0 commit comments

Comments
 (0)