fix epaint bytemuck dependency (#2913)
This commit is contained in:
parent
c86bfb6e67
commit
116d1547be
|
|
@ -111,11 +111,13 @@ impl ColorImage {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A view of the underlying data as `&[u8]`
|
/// A view of the underlying data as `&[u8]`
|
||||||
|
#[cfg(feature = "bytemuck")]
|
||||||
pub fn as_raw(&self) -> &[u8] {
|
pub fn as_raw(&self) -> &[u8] {
|
||||||
bytemuck::cast_slice(&self.pixels)
|
bytemuck::cast_slice(&self.pixels)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A view of the underlying data as `&mut [u8]`
|
/// A view of the underlying data as `&mut [u8]`
|
||||||
|
#[cfg(feature = "bytemuck")]
|
||||||
pub fn as_raw_mut(&mut self) -> &mut [u8] {
|
pub fn as_raw_mut(&mut self) -> &mut [u8] {
|
||||||
bytemuck::cast_slice_mut(&mut self.pixels)
|
bytemuck::cast_slice_mut(&mut self.pixels)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue