Skip to content

Remove unnecessary parentheses around range expressions #29068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/libstd/io/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ mod tests {

b.iter(|| {
let mut rd = &buf[..];
for _ in (0 .. 8) {
for _ in 0..8 {
let _ = rd.read(&mut dst);
test::black_box(&dst);
}
Expand All @@ -252,7 +252,7 @@ mod tests {

b.iter(|| {
let mut wr = &mut buf[..];
for _ in (0 .. 8) {
for _ in 0..8 {
let _ = wr.write_all(&src);
test::black_box(&wr);
}
Expand All @@ -266,7 +266,7 @@ mod tests {

b.iter(|| {
let mut rd = &buf[..];
for _ in (0 .. 8) {
for _ in 0..8 {
let _ = rd.read(&mut dst);
test::black_box(&dst);
}
Expand All @@ -280,7 +280,7 @@ mod tests {

b.iter(|| {
let mut wr = &mut buf[..];
for _ in (0 .. 8) {
for _ in 0..8 {
let _ = wr.write_all(&src);
test::black_box(&wr);
}
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/unix/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ pub fn args() -> Args {
let args = objc_msgSend(info, arguments_sel);

let cnt: usize = mem::transmute(objc_msgSend(args, count_sel));
for i in (0..cnt) {
for i in 0..cnt {
let tmp = objc_msgSend(args, object_at_sel, i);
let utf_c_str: *const libc::c_char =
mem::transmute(objc_msgSend(tmp, utf8_sel));
Expand Down
2 changes: 1 addition & 1 deletion src/test/bench/shootout-nbody.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ fn main() {
offset_momentum(&mut bodies);
println!("{:.9}", energy(&bodies));

for _ in (0..n) {
for _ in 0..n {
advance(&mut bodies, 0.01, &mut diff, &mut mag);
}

Expand Down