Skip to content

Commit

Permalink
Fix #40100, doc for inbounds use each index
Browse files Browse the repository at this point in the history
... deja vu (#39369)
  • Loading branch information
mbauman committed Mar 18, 2021
1 parent ae0dc54 commit 645b63e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/src/devdocs/boundscheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ For example, you might write the method `sum` as:
```julia
function sum(A::AbstractArray)
r = zero(eltype(A))
for i = 1:length(A)
for i in eachindex(A)
@inbounds r += A[i]
end
return r
Expand Down

0 comments on commit 645b63e

Please sign in to comment.