Take an IntoIterator instead of Iterator in prepare methods

This commit is contained in:
Héctor Ramón Jiménez 2023-07-07 07:04:00 +02:00 committed by Josh Groves
parent 1469768013
commit 595e09a497
2 changed files with 3 additions and 4 deletions

View file

@ -112,8 +112,7 @@ async fn run() {
bottom: 160,
},
default_color: Color::rgb(255, 255, 255),
}]
.into_iter(),
}],
&mut cache,
)
.unwrap();

View file

@ -68,7 +68,7 @@ impl TextRenderer {
font_system: &mut FontSystem,
atlas: &mut TextAtlas,
screen_resolution: Resolution,
text_areas: impl Iterator<Item = TextArea<'a>>,
text_areas: impl IntoIterator<Item = TextArea<'a>>,
cache: &mut SwashCache,
mut metadata_to_depth: impl FnMut(usize) -> f32,
) -> Result<(), PrepareError> {
@ -349,7 +349,7 @@ impl TextRenderer {
font_system: &mut FontSystem,
atlas: &mut TextAtlas,
screen_resolution: Resolution,
text_areas: impl Iterator<Item = TextArea<'a>>,
text_areas: impl IntoIterator<Item = TextArea<'a>>,
cache: &mut SwashCache,
) -> Result<(), PrepareError> {
self.prepare_with_depth(