Skip to content

Commit afb1b9c

Browse files
committed
Rollup merge of rust-lang#29062 - rgardner:rgardner-fix-book-comp-warning, r=alexcrichton
Before this commit, the first "A Rust library" code sample produced the following compilation warning: ``` test.rs:7:22: 7:36 warning: unnecessary parentheses around `for` head expression, #[warn(unused_parens)] on by default test.rs:7 for _ in (0..5_000_000) { ``` This commit just removes the parens around the range 0..5_000_000 thereby removing the compilation warning.
2 parents 0d96b54 + c8b6c12 commit afb1b9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/trpl/rust-inside-other-languages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ fn process() {
108108
let handles: Vec<_> = (0..10).map(|_| {
109109
thread::spawn(|| {
110110
let mut x = 0;
111-
for _ in (0..5_000_000) {
111+
for _ in 0..5_000_000 {
112112
x += 1
113113
}
114114
x

0 commit comments

Comments
 (0)