Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Switched the TODO comment in image_texture_conversion.rs #2981

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion crates/bevy_render/src/texture/image_texture_conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ impl From<image::DynamicImage> 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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down