pub fn update(&mut self) {
        for textures in self.textures.values_mut() {
            for texture in textures.iter_mut() {
                texture.frames_since_last_use += 1;
                texture.taken = false;
            }

            textures.retain(|texture| texture.frames_since_last_use < 3);
        }
    }
/// Updates the cache and only retains recently used textures.
Updates the cache and only retains recently used textures.
Updates the cache and only retains recently used textures .
pub fn update(&mut self) {
        for textures in self.textures.values_mut() {
            for texture in textures.iter_mut() {
                texture.frames_since_last_use += 1;
                texture.taken = false;
            }
            textures.retain(|texture| texture.frames_since_last_use < 3);
        }
    }
pub fn update ( & mut self ) { for textures in self . textures . values_mut ( ) { for texture in textures . iter_mut ( ) { texture . frames_since_last_use += 1 ; texture . taken = false ; } textures . retain ( | texture | texture . frames_since_last_use < 3 ) ; } }
Updates the cache and only retains recently used textures.
Updates the cache and only retains recently used textures .
&mut self
&mut self