Skip to content

Commit

Permalink
cargo fmt --all
Browse files Browse the repository at this point in the history
  • Loading branch information
ickshonpe committed Oct 31, 2023
1 parent 2da0c86 commit 2b5dac4
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions crates/bevy_ui/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -824,14 +824,13 @@ pub fn prepare_uinodes(
let item = &mut ui_phase.items[item_index];
if let Some(extracted_uinode) = extracted_uinodes.uinodes.get(&item.entity) {
let mut existing_batch = batches.last_mut();

if batch_image_handle == AssetId::invalid()
|| existing_batch.is_none()
|| (
batch_image_handle != AssetId::default()
&& extracted_uinode.image != AssetId::default()
&& batch_image_handle != extracted_uinode.image
) {
|| existing_batch.is_none()
|| (batch_image_handle != AssetId::default()
&& extracted_uinode.image != AssetId::default()
&& batch_image_handle != extracted_uinode.image)
{
if let Some(gpu_image) = gpu_images.get(extracted_uinode.image) {
batch_item_index = item_index;
batch_image_handle = extracted_uinode.image;
Expand Down Expand Up @@ -861,7 +860,9 @@ pub fn prepare_uinodes(
} else {
continue;
}
} else if batch_image_handle == AssetId::default() && extracted_uinode.image != AssetId::default() {
} else if batch_image_handle == AssetId::default()
&& extracted_uinode.image != AssetId::default()
{
if let Some(gpu_image) = gpu_images.get(extracted_uinode.image) {
batch_image_handle = extracted_uinode.image;
existing_batch.as_mut().unwrap().1.image = extracted_uinode.image;
Expand Down

0 comments on commit 2b5dac4

Please sign in to comment.