Skip to content

Commit ce8b3b0

Browse files
committed
Revert "update to N5N3's suggestion"
This reverts commit eaaefb1.
1 parent 869f85e commit ce8b3b0

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
@@ -921,11 +921,11 @@ end
921921
function copyto!(dest::AbstractArray, dstart::Integer, src)
922922
i = Int(dstart)
923923
if haslength(src)
924+
checkbounds(dest, i)
924925
checkbounds(dest, i + length(src) - 1)
925-
I = eachindex(dest)[i]
926-
@inbounds for x in src
927-
dest[I] = x
928-
I = nextind(dest, I)
926+
for x in src
927+
@inbounds dest[i] = x
928+
i += 1
929929
end
930930
else
931931
for x in src

0 commit comments

Comments
 (0)