From 116d1547be9d6a6827ce06f9cd159e234734b94e Mon Sep 17 00:00:00 2001 From: Ryan Hileman Date: Tue, 18 Apr 2023 05:51:38 -0700 Subject: [PATCH] fix epaint bytemuck dependency (#2913) --- crates/epaint/src/image.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/epaint/src/image.rs b/crates/epaint/src/image.rs index 325704cc..35b0885c 100644 --- a/crates/epaint/src/image.rs +++ b/crates/epaint/src/image.rs @@ -111,11 +111,13 @@ impl ColorImage { } /// A view of the underlying data as `&[u8]` + #[cfg(feature = "bytemuck")] pub fn as_raw(&self) -> &[u8] { bytemuck::cast_slice(&self.pixels) } /// A view of the underlying data as `&mut [u8]` + #[cfg(feature = "bytemuck")] pub fn as_raw_mut(&mut self) -> &mut [u8] { bytemuck::cast_slice_mut(&mut self.pixels) }