Skip to content

Guide: Fix off-by-one error#18309

Merged
bors merged 1 commit intorust-lang:masterfrom
cakebaker:fix_off_by_one
Oct 28, 2014
Merged

Guide: Fix off-by-one error#18309
bors merged 1 commit intorust-lang:masterfrom
cakebaker:fix_off_by_one

Conversation

@cakebaker
Copy link
Contributor

The code snippet range(1i, 100i).map(|x| x + 1i); would produce the numbers 2-100 (and not 2-101) because the range produces the numbers 1-99.

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Oct 27, 2014
@bors bors merged commit 1221999 into rust-lang:master Oct 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants