Skip to content

Commit 05b055d

Browse files
committed
Revert "update to N5N3's suggestion"
This reverts commit eaaefb1.
1 parent 559bcb6 commit 05b055d

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
@@ -925,11 +925,11 @@ end
925925
function copyto!(dest::AbstractArray, dstart::Integer, src)
926926
i = Int(dstart)
927927
if haslength(src)
928+
checkbounds(dest, i)
928929
checkbounds(dest, i + length(src) - 1)
929-
I = eachindex(dest)[i]
930-
@inbounds for x in src
931-
dest[I] = x
932-
I = nextind(dest, I)
930+
for x in src
931+
@inbounds dest[i] = x
932+
i += 1
933933
end
934934
else
935935
for x in src

0 commit comments

Comments
 (0)