From 595e09a497272a86a725ee6d6c6cad4a0410cedd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Fri, 7 Jul 2023 07:04:00 +0200 Subject: [PATCH] Take an `IntoIterator` instead of `Iterator` in `prepare` methods --- examples/hello-world.rs | 3 +-- src/text_render.rs | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/hello-world.rs b/examples/hello-world.rs index 97ea835..1156551 100644 --- a/examples/hello-world.rs +++ b/examples/hello-world.rs @@ -112,8 +112,7 @@ async fn run() { bottom: 160, }, default_color: Color::rgb(255, 255, 255), - }] - .into_iter(), + }], &mut cache, ) .unwrap(); diff --git a/src/text_render.rs b/src/text_render.rs index 50aa930..20411a3 100644 --- a/src/text_render.rs +++ b/src/text_render.rs @@ -68,7 +68,7 @@ impl TextRenderer { font_system: &mut FontSystem, atlas: &mut TextAtlas, screen_resolution: Resolution, - text_areas: impl Iterator>, + text_areas: impl IntoIterator>, 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>, + text_areas: impl IntoIterator>, cache: &mut SwashCache, ) -> Result<(), PrepareError> { self.prepare_with_depth(