Change quaternion debug format back to list form

This commit is contained in:
Owen Brooks 2022-06-17 17:38:03 +10:00
parent b16a3edbbe
commit 2dd76fd86e
1 changed files with 2 additions and 5 deletions

View File

@ -37,11 +37,8 @@ pub struct Quaternion<T> {
impl<T: fmt::Debug> fmt::Debug for Quaternion<T> { impl<T: fmt::Debug> fmt::Debug for Quaternion<T> {
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
formatter formatter
.debug_struct("Quaternion") .debug_list()
.field("x", &self.coords[0]) .entries(self.coords.iter())
.field("y", &self.coords[1])
.field("z", &self.coords[2])
.field("w", &self.coords[3])
.finish() .finish()
} }
} }