From 9f47697e408c018ec27174308394c9376c57183d Mon Sep 17 00:00:00 2001 From: William Batista Date: Mon, 25 Oct 2021 21:59:24 +0000 Subject: [PATCH] Switched the TODO comment in image_texture_conversion.rs (#2981) # Objective The current TODO comment is out of date ## Solution I switched up the comment Co-authored-by: William Batista <45850508+billyb2@users.noreply.github.com> --- crates/bevy_render/src/texture/image_texture_conversion.rs | 3 ++- pipelined/bevy_render2/src/texture/image_texture_conversion.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/bevy_render/src/texture/image_texture_conversion.rs b/crates/bevy_render/src/texture/image_texture_conversion.rs index 27bfab9df6..d355860f26 100644 --- a/crates/bevy_render/src/texture/image_texture_conversion.rs +++ b/crates/bevy_render/src/texture/image_texture_conversion.rs @@ -86,7 +86,8 @@ impl From for Texture { Vec::with_capacity(width as usize * height as usize * format.pixel_size()); for pixel in image.into_raw().chunks_exact(3) { - // TODO unsafe_get in release builds? + // TODO use the array_chunks method once stabilised + // https://github.com/rust-lang/rust/issues/74985 let r = pixel[0]; let g = pixel[1]; let b = pixel[2]; diff --git a/pipelined/bevy_render2/src/texture/image_texture_conversion.rs b/pipelined/bevy_render2/src/texture/image_texture_conversion.rs index 862ff5ee58..85126f23c2 100644 --- a/pipelined/bevy_render2/src/texture/image_texture_conversion.rs +++ b/pipelined/bevy_render2/src/texture/image_texture_conversion.rs @@ -87,7 +87,8 @@ pub(crate) fn image_to_texture(dyn_img: image::DynamicImage) -> Image { Vec::with_capacity(width as usize * height as usize * format.pixel_size()); for pixel in image.into_raw().chunks_exact(3) { - // TODO unsafe_get in release builds? + // TODO use the array_chunks method once stabilised + // https://github.com/rust-lang/rust/issues/74985 let r = pixel[0]; let g = pixel[1]; let b = pixel[2];