aboutsummaryrefslogtreecommitdiff
path: root/lib/std/process.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-02-18 15:34:00 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-02-18 19:20:19 -0700
commit74db8c2e8348cb7e9bf264294f73d26be956ea61 (patch)
tree19e4cf466b86153493adfb8eeded5a16f0db323f /lib/std/process.zig
parent7abeb52abc9e9e38d8af4e17e25e89083cdec397 (diff)
downloadzig-74db8c2e8348cb7e9bf264294f73d26be956ea61.tar.gz
zig-74db8c2e8348cb7e9bf264294f73d26be956ea61.zip
omit safety checks for element access in for loops
One of the main points of for loops is that you can safety check the length once, before entering the loop, and then safely assume that every element inside the loop is in bounds. In master branch, the safety checks are incorrectly intact even inside for loops. This commit fixes it. It's especially nice with multi-object loops because the number of elided checks is N * M where N is how many iterations and M is how many objects.
Diffstat (limited to 'lib/std/process.zig')
0 files changed, 0 insertions, 0 deletions