Skip to content

Commit

Permalink
fix clippy warnings: this looks like a formatting argument but it is …
Browse files Browse the repository at this point in the history
…not part of a formatting macro
  • Loading branch information
0x53A committed Feb 9, 2025
1 parent 71bbfb8 commit a708148
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions itest/rust/src/builtin_tests/geometry/quaternion_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,19 @@ fn quaternion_from_axis_angle() {
assert_eq_approx!(quat.w, 0.877583);

// 2. Should panic if axis is not normalized.
expect_panic("Quaternion axis {axis:?} is not normalized.", || {
Quaternion::from_axis_angle(Vector3::ZERO, 1.0);
});
expect_panic(
&format!("Quaternion axis {:?} is not normalized.", Vector3::ZERO),
|| {
Quaternion::from_axis_angle(Vector3::ZERO, 1.0);
},
);

expect_panic("Quaternion axis {axis:?} is not normalized.", || {
Quaternion::from_axis_angle(Vector3::UP * 0.7, 1.0);
});
expect_panic(
&format!("Quaternion axis {:?} is not normalized.", Vector3::UP * 0.7),
|| {
Quaternion::from_axis_angle(Vector3::UP * 0.7, 1.0);
},
);
}

#[itest]
Expand Down

0 comments on commit a708148

Please sign in to comment.