From cdef6bcbc3434ed64ff01bf12f41472c3cba3d0f Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Wed, 3 Jan 2024 11:41:26 -0800 Subject: [PATCH] Removed unnecessary bytemuck usage This was copy-pasted from a Buffer implementation that was removed from Kludgine, since Buffer isn't public. --- Cargo.lock | 1 - Cargo.toml | 1 - src/window.rs | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bca7823..f24cbea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -574,7 +574,6 @@ dependencies = [ "ahash", "alot", "arboard", - "bytemuck", "cushy-macros", "figures", "image", diff --git a/Cargo.toml b/Cargo.toml index 00cc8ed..f302ca9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,6 @@ arboard = "3.2.1" zeroize = "1.6.1" unicode-segmentation = "1.10.1" pollster = "0.3.0" -bytemuck = "1.14.0" # [patch.crates-io] diff --git a/src/window.rs b/src/window.rs index ae29088..fcbc53a 100644 --- a/src/window.rs +++ b/src/window.rs @@ -2774,8 +2774,7 @@ where Ok(()) })?; - self.data - .extend_from_slice(bytemuck::cast_slice(&slice.get_mapped_range())); + self.data.extend_from_slice(&slice.get_mapped_range()); Format::convert_rgba(&mut self.data, render_size.width.get(), bytes_per_row);