Skip to content

Commit c8b6c12

Browse files
committed
Resolve unused_parens compilation warning
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.
1 parent 56a1419 commit c8b6c12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
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)