all: address clippy lints
This commit is contained in:
parent
e5fd0fa192
commit
9e67158f47
29 changed files with 31 additions and 68 deletions
|
|
@ -60,7 +60,7 @@ where
|
|||
self.data.borrow_mut().clear();
|
||||
}
|
||||
|
||||
pub fn get_or_create(&self, target: &Target, default: impl FnOnce() -> T) -> RefMut<T> {
|
||||
pub fn get_or_create(&self, target: &Target, default: impl FnOnce() -> T) -> RefMut<'_, T> {
|
||||
RefMut::map(self.data.borrow_mut(), |d| {
|
||||
&mut d
|
||||
.entry(target.id())
|
||||
|
|
@ -75,7 +75,7 @@ where
|
|||
})
|
||||
}
|
||||
|
||||
pub fn get(&self, target: &Target) -> Option<RefMut<T>> {
|
||||
pub fn get(&self, target: &Target) -> Option<RefMut<'_, T>> {
|
||||
RefMut::filter_map(self.data.borrow_mut(), |d| {
|
||||
d.get_mut(&target.id()).map(|d| &mut d.data)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue