From 3d7928ce73bb6da5047cb9c833fb1ff5dd0eab82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rasmus=20Br=C3=B6nneg=C3=A5rd?= <1162652+rasmusgo@users.noreply.github.com> Date: Thu, 16 May 2024 12:53:16 +0200 Subject: [PATCH] impl fmt::Debug for Version --- sys/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/src/lib.rs b/sys/src/lib.rs index 2d43e0d..59ec225 100644 --- a/sys/src/lib.rs +++ b/sys/src/lib.rs @@ -153,7 +153,7 @@ wrapper! { } wrapper! { - #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] + #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] Version(u64) } @@ -191,6 +191,12 @@ impl fmt::Display for Version { } } +impl fmt::Debug for Version { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + write!(fmt, "{}.{}.{}", self.major(), self.minor(), self.patch()) + } +} + pub const FREQUENCY_UNSPECIFIED: f32 = 0.0; impl Quaternionf {