🔧 Avoid using global static mut variables when possible

This commit is contained in:
elenatorro 2025-03-05 16:26:34 +01:00
parent 0279e75c4b
commit 3a8ba4cbee
6 changed files with 270 additions and 218 deletions

View file

@ -458,7 +458,7 @@ impl RenderState {
if self
.cached_surface_image
.as_ref()
.map_or(true, |img| img.invalid)
.is_none_or(|img| img.invalid)
{
self.cached_surface_image = Some(CachedSurfaceImage {
image: self.surfaces.snapshot(SurfaceId::Current),