Skip to content

Commit 85b2d9b

Browse files
committed
fmt
1 parent fc152cd commit 85b2d9b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Diff for: library/core/tests/iter.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,9 @@ fn test_zip_next_back_side_effects_exhausted() {
379379
#[derive(Debug)]
380380
struct CountClone(Cell<i32>);
381381

382-
fn count_clone() -> CountClone { CountClone(Cell::new(0)) }
382+
fn count_clone() -> CountClone {
383+
CountClone(Cell::new(0))
384+
}
383385

384386
impl PartialEq<i32> for CountClone {
385387
fn eq(&self, rhs: &i32) -> bool {
@@ -401,15 +403,15 @@ fn test_zip_cloned_sideffectful() {
401403
let xs = [count_clone(), count_clone(), count_clone(), count_clone()];
402404
let ys = [count_clone(), count_clone()];
403405

404-
for _ in xs.iter().cloned().zip(ys.iter().cloned()) { }
406+
for _ in xs.iter().cloned().zip(ys.iter().cloned()) {}
405407

406408
assert_eq!(&xs, &[1, 1, 1, 0][..]);
407409
assert_eq!(&ys, &[1, 1][..]);
408410

409411
let xs = [count_clone(), count_clone()];
410412
let ys = [count_clone(), count_clone(), count_clone(), count_clone()];
411413

412-
for _ in xs.iter().cloned().zip(ys.iter().cloned()) { }
414+
for _ in xs.iter().cloned().zip(ys.iter().cloned()) {}
413415

414416
assert_eq!(&xs, &[1, 1][..]);
415417
assert_eq!(&ys, &[1, 1, 0, 0][..]);
@@ -420,15 +422,15 @@ fn test_zip_map_sideffectful() {
420422
let mut xs = [0; 6];
421423
let mut ys = [0; 4];
422424

423-
for _ in xs.iter_mut().map(|x| *x += 1).zip(ys.iter_mut().map(|y| *y += 1)) { }
425+
for _ in xs.iter_mut().map(|x| *x += 1).zip(ys.iter_mut().map(|y| *y += 1)) {}
424426

425427
assert_eq!(&xs, &[1, 1, 1, 1, 1, 0]);
426428
assert_eq!(&ys, &[1, 1, 1, 1]);
427429

428430
let mut xs = [0; 4];
429431
let mut ys = [0; 6];
430432

431-
for _ in xs.iter_mut().map(|x| *x += 1).zip(ys.iter_mut().map(|y| *y += 1)) { }
433+
for _ in xs.iter_mut().map(|x| *x += 1).zip(ys.iter_mut().map(|y| *y += 1)) {}
432434

433435
assert_eq!(&xs, &[1, 1, 1, 1]);
434436
assert_eq!(&ys, &[1, 1, 1, 1, 0, 0]);

0 commit comments

Comments
 (0)