From af5de1cb924462858946620cc41902e289a96e68 Mon Sep 17 00:00:00 2001 From: Daria Sukhonina Date: Mon, 10 Jan 2022 19:36:09 +0300 Subject: [PATCH] fix: `SpriteView` lifetime --- wasm4/src/draw.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wasm4/src/draw.rs b/wasm4/src/draw.rs index 6835c2e..266d34e 100644 --- a/wasm4/src/draw.rs +++ b/wasm4/src/draw.rs @@ -170,9 +170,9 @@ pub struct SpriteView<'a> { shape: [u32; 2], } -impl SpriteView<'_> { +impl<'a> SpriteView<'a> { /// Get the view's underlying sprite. - pub fn sprite(&self) -> &Sprite { + pub fn sprite(&self) -> &'a Sprite { self.sprite }