Skip to content

Commit ebf054b

Browse files
committed
cargo dev fmt
1 parent 62b6aea commit ebf054b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/ui/field_reassign_with_default.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ struct B {
1515
struct SideEffect(i32);
1616

1717
impl SideEffect {
18-
fn new() -> SideEffect { SideEffect(0) }
18+
fn new() -> SideEffect {
19+
SideEffect(0)
20+
}
1921
fn next(&mut self) -> i32 {
2022
self.0 += 1;
2123
self.0
@@ -98,7 +100,8 @@ fn main() {
98100
x.i = 42;
99101
x.j = 21 + x.i as i64;
100102

101-
// right, we bail out if there's a reassignment to the same variable, since there is a risk of side-effects affecting the outcome
103+
// right, we bail out if there's a reassignment to the same variable, since there is a risk of
104+
// side-effects affecting the outcome
102105
let mut x = A::default();
103106
let mut side_effect = SideEffect::new();
104107
x.i = side_effect.next();

0 commit comments

Comments
 (0)