Merge pull request #353 from 8bitkitkat/master

Add get_mut to Textures struct
This commit is contained in:
Joonas Javanainen 2020-09-03 00:18:24 +03:00 committed by GitHub
commit b934a20c97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,4 +75,8 @@ impl<T> Textures<T> {
pub fn get(&self, id: TextureId) -> Option<&T> {
self.textures.get(&id.0)
}
pub fn get_mut(&mut self, id: TextureId) -> Option<&mut T> {
self.textures.get_mut(&id.0)
}
}