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.
This commit is contained in:
parent
56a14192e9
commit
c8b6c125d4
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ fn process() {
|
||||||
let handles: Vec<_> = (0..10).map(|_| {
|
let handles: Vec<_> = (0..10).map(|_| {
|
||||||
thread::spawn(|| {
|
thread::spawn(|| {
|
||||||
let mut x = 0;
|
let mut x = 0;
|
||||||
for _ in (0..5_000_000) {
|
for _ in 0..5_000_000 {
|
||||||
x += 1
|
x += 1
|
||||||
}
|
}
|
||||||
x
|
x
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue