Skip to content

Commit

Permalink
replace nextind with i+1
Browse files Browse the repository at this point in the history
  • Loading branch information
mcabbott committed Feb 9, 2022
1 parent f9c86be commit ecdbfe9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -894,10 +894,10 @@ function copyto!(dest::AbstractArray, src)
if haslength(src)
length(dest) < length(src) &&
throw(ArgumentError("destination has fewer elements than required"))
I = firstindex(dest)
i = Int(firstindex(dest))
@inbounds for x in src
dest[I] = x
I = nextind(dest, I)
dest[i] = x
i += 1
end
else
destiter = eachindex(dest)
Expand Down

0 comments on commit ecdbfe9

Please sign in to comment.