Fix formatter bugs

This commit is contained in:
2026-06-26 01:29:51 +02:00
parent e5509e89a4
commit 6c9c0e03d2
13 changed files with 173 additions and 84 deletions
+16 -4
View File
@@ -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);