From 9924653a909bc5e9f121e2bf43618be34e865573 Mon Sep 17 00:00:00 2001 From: Lokathor Date: Fri, 9 Dec 2022 12:33:38 -0700 Subject: [PATCH] must_use --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 5352e4c..cd0d789 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -118,6 +118,7 @@ impl Align4<[u8; N]> { /// ## Panics /// * If the number of bytes isn't a multiple of 4 #[inline] + #[must_use] pub fn as_u32_slice(&self) -> &[u32] { assert!(self.0.len() % 4 == 0); // Safety: our struct is aligned to 4, so the pointer will already be @@ -133,6 +134,7 @@ impl Align4<[u8; N]> { /// ## Panics /// * If the number of bytes isn't a multiple of 2 #[inline] + #[must_use] pub fn as_u16_slice(&self) -> &[u16] { assert!(self.0.len() % 2 == 0); // Safety: our struct is aligned to 4, so the pointer will already be