Skip to content

Commit a708148

Browse files
committed
fix clippy warnings: this looks like a formatting argument but it is not part of a formatting macro
1 parent 71bbfb8 commit a708148

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

itest/rust/src/builtin_tests/geometry/quaternion_test.rs

+12-6
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,19 @@ fn quaternion_from_axis_angle() {
4141
assert_eq_approx!(quat.w, 0.877583);
4242

4343
// 2. Should panic if axis is not normalized.
44-
expect_panic("Quaternion axis {axis:?} is not normalized.", || {
45-
Quaternion::from_axis_angle(Vector3::ZERO, 1.0);
46-
});
44+
expect_panic(
45+
&format!("Quaternion axis {:?} is not normalized.", Vector3::ZERO),
46+
|| {
47+
Quaternion::from_axis_angle(Vector3::ZERO, 1.0);
48+
},
49+
);
4750

48-
expect_panic("Quaternion axis {axis:?} is not normalized.", || {
49-
Quaternion::from_axis_angle(Vector3::UP * 0.7, 1.0);
50-
});
51+
expect_panic(
52+
&format!("Quaternion axis {:?} is not normalized.", Vector3::UP * 0.7),
53+
|| {
54+
Quaternion::from_axis_angle(Vector3::UP * 0.7, 1.0);
55+
},
56+
);
5157
}
5258

5359
#[itest]

0 commit comments

Comments
 (0)