From 58e41fec04ad0c240ca1ee7c65cb9437abc332ff Mon Sep 17 00:00:00 2001 From: Natasha England-Elbro Date: Mon, 5 Feb 2024 11:35:05 +0000 Subject: [PATCH] fix: not using debug impl for printing Index --- citro3d/src/uniform.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/citro3d/src/uniform.rs b/citro3d/src/uniform.rs index 23586c9..aa886e2 100644 --- a/citro3d/src/uniform.rs +++ b/citro3d/src/uniform.rs @@ -70,12 +70,11 @@ impl Uniform { pub(crate) fn bind(self, _instance: &mut Instance, ty: shader::Type, index: Index) { assert!( self.index_range().contains(&index), - "tried to bind uniform to an invalid index (index: {}, valid range: {}..{})", - index.0, - self.index_range().start.0, - self.index_range().end.0 + "tried to bind uniform to an invalid index (index: {:?}, valid range: {:?})", + index, + self.index_range(), ); - assert!(self.index_range().end.0 as usize >= self.len() + index.0 as usize, "tried to bind a uniform that would overflow the uniform buffer. index was {}, size was {} max is {}", index.0, self.len(), self.index_range().end.0); + assert!(self.index_range().end.0 as usize >= self.len() + index.0 as usize, "tried to bind a uniform that would overflow the uniform buffer. index was {:?}, size was {} max is {:?}", index, self.len(), self.index_range().end); let set_fvs = |fs: &[FVec4]| { for (off, f) in fs.iter().enumerate() { unsafe {