Fix formatter bugs
This commit is contained in:
@@ -12,7 +12,10 @@ impl Vector2 {
|
||||
}
|
||||
|
||||
pub void test_inherent_impl() {
|
||||
let v = Vector2 { x: 3, y: 4 };
|
||||
let v = Vector2 {
|
||||
x: 3,
|
||||
y: 4,
|
||||
};
|
||||
assert_eq!(v.magnitude(), 25);
|
||||
}
|
||||
|
||||
@@ -27,7 +30,10 @@ impl Display for Vector2 {
|
||||
}
|
||||
|
||||
pub void test_trait_impl_block() {
|
||||
let v = Vector2 { x: 1, y: 2 };
|
||||
let v = Vector2 {
|
||||
x: 1,
|
||||
y: 2,
|
||||
};
|
||||
let s = v.display();
|
||||
assert_eq!(s.len() > 0, true);
|
||||
}
|
||||
@@ -42,8 +48,14 @@ impl Vector2 {
|
||||
}
|
||||
|
||||
pub void test_multiple_impls() {
|
||||
let a = Vector2 { x: 1, y: 2 };
|
||||
let b = Vector2 { x: 3, y: 4 };
|
||||
let a = Vector2 {
|
||||
x: 1,
|
||||
y: 2,
|
||||
};
|
||||
let b = Vector2 {
|
||||
x: 3,
|
||||
y: 4,
|
||||
};
|
||||
let c = a.add(b);
|
||||
assert_eq!(c.x, 4);
|
||||
assert_eq!(c.y, 6);
|
||||
|
||||
Reference in New Issue
Block a user