From 7294ec606d0247651a11275e29bf5428b0e91835 Mon Sep 17 00:00:00 2001 From: x10A94 Date: Mon, 30 Sep 2024 21:46:29 +0300 Subject: [PATCH 1/2] Fix lifetimes on render() --- src/text_render.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/text_render.rs b/src/text_render.rs index 3d57b86..0942f12 100644 --- a/src/text_render.rs +++ b/src/text_render.rs @@ -331,10 +331,10 @@ impl TextRenderer { } /// Renders all layouts that were previously provided to `prepare`. - pub fn render<'pass>( - &'pass self, - atlas: &'pass TextAtlas, - viewport: &'pass Viewport, + pub fn render<'s, 'pass>( + &'s self, + atlas: &'s TextAtlas, + viewport: &'s Viewport, pass: &mut RenderPass<'pass>, ) -> Result<(), RenderError> { if self.glyph_vertices.is_empty() { From 507db98c90d2bc5e8a3835b65cc9b0f5fbcb767b Mon Sep 17 00:00:00 2001 From: x10A94 Date: Mon, 30 Sep 2024 21:55:17 +0300 Subject: [PATCH 2/2] Relax lifetimes further --- src/text_render.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/text_render.rs b/src/text_render.rs index 0942f12..a4b45cf 100644 --- a/src/text_render.rs +++ b/src/text_render.rs @@ -331,11 +331,11 @@ impl TextRenderer { } /// Renders all layouts that were previously provided to `prepare`. - pub fn render<'s, 'pass>( - &'s self, - atlas: &'s TextAtlas, - viewport: &'s Viewport, - pass: &mut RenderPass<'pass>, + pub fn render( + &self, + atlas: &TextAtlas, + viewport: &Viewport, + pass: &mut RenderPass<'_>, ) -> Result<(), RenderError> { if self.glyph_vertices.is_empty() { return Ok(());