Remove resource method get_mut
This commit is contained in:
parent
cbe4e4ac40
commit
a4c083f727
1 changed files with 1 additions and 5 deletions
|
@ -76,10 +76,6 @@ impl Resources {
|
||||||
.flatten()
|
.flatten()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_mut<T: Resource>(&mut self) -> &mut T {
|
|
||||||
self.get_mut_opt::<T>().unwrap()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn get_mut_by_type_id<T: Resource>(&mut self, type_id: TypeId) -> &mut T {
|
pub fn get_mut_by_type_id<T: Resource>(&mut self, type_id: TypeId) -> &mut T {
|
||||||
self.get_mut_opt_by_type_id(type_id).unwrap()
|
self.get_mut_opt_by_type_id(type_id).unwrap()
|
||||||
}
|
}
|
||||||
|
@ -89,7 +85,7 @@ impl Resources {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_mut_unchecked<'a, T: Resource>(&mut self) -> &'a mut T {
|
pub fn get_mut_unchecked<'a, T: Resource>(&mut self) -> &'a mut T {
|
||||||
unsafe { remove_life_time_mut(self.get_mut::<T>()) }
|
unsafe { remove_life_time_mut(GetDisjointMut::<'_, &'_ mut T>::get_mut(self).unwrap()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_mut_opt<T: Resource>(&mut self) -> Option<&mut T> {
|
pub fn get_mut_opt<T: Resource>(&mut self) -> Option<&mut T> {
|
||||||
|
|
Loading…
Reference in a new issue