Take an IntoIterator
instead of Iterator
in prepare
methods
This commit is contained in:
parent
1469768013
commit
595e09a497
2 changed files with 3 additions and 4 deletions
|
@ -112,8 +112,7 @@ async fn run() {
|
||||||
bottom: 160,
|
bottom: 160,
|
||||||
},
|
},
|
||||||
default_color: Color::rgb(255, 255, 255),
|
default_color: Color::rgb(255, 255, 255),
|
||||||
}]
|
}],
|
||||||
.into_iter(),
|
|
||||||
&mut cache,
|
&mut cache,
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
|
@ -68,7 +68,7 @@ impl TextRenderer {
|
||||||
font_system: &mut FontSystem,
|
font_system: &mut FontSystem,
|
||||||
atlas: &mut TextAtlas,
|
atlas: &mut TextAtlas,
|
||||||
screen_resolution: Resolution,
|
screen_resolution: Resolution,
|
||||||
text_areas: impl Iterator<Item = TextArea<'a>>,
|
text_areas: impl IntoIterator<Item = TextArea<'a>>,
|
||||||
cache: &mut SwashCache,
|
cache: &mut SwashCache,
|
||||||
mut metadata_to_depth: impl FnMut(usize) -> f32,
|
mut metadata_to_depth: impl FnMut(usize) -> f32,
|
||||||
) -> Result<(), PrepareError> {
|
) -> Result<(), PrepareError> {
|
||||||
|
@ -349,7 +349,7 @@ impl TextRenderer {
|
||||||
font_system: &mut FontSystem,
|
font_system: &mut FontSystem,
|
||||||
atlas: &mut TextAtlas,
|
atlas: &mut TextAtlas,
|
||||||
screen_resolution: Resolution,
|
screen_resolution: Resolution,
|
||||||
text_areas: impl Iterator<Item = TextArea<'a>>,
|
text_areas: impl IntoIterator<Item = TextArea<'a>>,
|
||||||
cache: &mut SwashCache,
|
cache: &mut SwashCache,
|
||||||
) -> Result<(), PrepareError> {
|
) -> Result<(), PrepareError> {
|
||||||
self.prepare_with_depth(
|
self.prepare_with_depth(
|
||||||
|
|
Loading…
Reference in a new issue