diff options
| author | Robert Gardner <rhg259@nyu.edu> | 2015-10-14 17:38:56 -0400 |
|---|---|---|
| committer | Robert Gardner <rhg259@nyu.edu> | 2015-10-14 17:38:56 -0400 |
| commit | c8b6c125d4e13ec3f9b3d49ce17ca24b12b25ab9 (patch) | |
| tree | 4edd7d05135ab81b4048b0018683a27027ddd141 | |
| parent | 56a14192e9793a06b33fa11210765d2118a228d9 (diff) | |
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.
| -rw-r--r-- | src/doc/trpl/rust-inside-other-languages.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/trpl/rust-inside-other-languages.md b/src/doc/trpl/rust-inside-other-languages.md index 47e1df37dff..5c0bde02f96 100644 --- a/src/doc/trpl/rust-inside-other-languages.md +++ b/src/doc/trpl/rust-inside-other-languages.md @@ -108,7 +108,7 @@ fn process() { let handles: Vec<_> = (0..10).map(|_| { thread::spawn(|| { let mut x = 0; - for _ in (0..5_000_000) { + for _ in 0..5_000_000 { x += 1 } x |
