Skip to content

Commit

Permalink
try_for_each
Browse files Browse the repository at this point in the history
  • Loading branch information
UkoeHB committed Aug 31, 2024
1 parent 72301ab commit ba9b0ab
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/bevy_text/src/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ impl TextPipeline {
.iter()
.map(move |layout_glyph| (layout_glyph, run.line_y))
})
.map(|(layout_glyph, line_y)| {
.try_for_each(|(layout_glyph, line_y)| {
let section_index = layout_glyph.metadata;

let font_handle = sections[section_index].style.font.clone_weak();
Expand Down Expand Up @@ -230,8 +230,7 @@ impl TextPipeline {
PositionedGlyph::new(position, glyph_size.as_vec2(), atlas_info, section_index);
layout_info.glyphs.push(pos_glyph);
Ok(())
})
.collect::<Result<(), _>>()?;
})?;

layout_info.size = box_size;
Ok(())
Expand Down

0 comments on commit ba9b0ab

Please sign in to comment.