mirror of
https://github.com/bevyengine/bevy
synced 2025-02-16 14:08:32 +00:00
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>
This commit is contained in:
parent
7b686b5031
commit
9f47697e40
2 changed files with 4 additions and 2 deletions
|
@ -86,7 +86,8 @@ impl From<image::DynamicImage> for Texture {
|
||||||
Vec::with_capacity(width as usize * height as usize * format.pixel_size());
|
Vec::with_capacity(width as usize * height as usize * format.pixel_size());
|
||||||
|
|
||||||
for pixel in image.into_raw().chunks_exact(3) {
|
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 r = pixel[0];
|
||||||
let g = pixel[1];
|
let g = pixel[1];
|
||||||
let b = pixel[2];
|
let b = pixel[2];
|
||||||
|
|
|
@ -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());
|
Vec::with_capacity(width as usize * height as usize * format.pixel_size());
|
||||||
|
|
||||||
for pixel in image.into_raw().chunks_exact(3) {
|
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 r = pixel[0];
|
||||||
let g = pixel[1];
|
let g = pixel[1];
|
||||||
let b = pixel[2];
|
let b = pixel[2];
|
||||||
|
|
Loading…
Add table
Reference in a new issue