From 46bb2bac4ec89946ea185eb7bc6c2f8166636535 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 30 Sep 2024 17:08:12 -0700 Subject: [PATCH] deconstruct array instead of indexing --- fixed_wide/src/fixed.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fixed_wide/src/fixed.rs b/fixed_wide/src/fixed.rs index 14c8245..852ccff 100644 --- a/fixed_wide/src/fixed.rs +++ b/fixed_wide/src/fixed.rs @@ -65,7 +65,8 @@ impl Fixed<1,F>{ } #[inline] pub const fn to_raw(self)->i64{ - self.to_bits().to_bits().digits()[0] as i64 + let &[digit]=self.to_bits().to_bits().digits(); + digit as i64 } }