1
0
Fork 0
forked from wry/wry

all: address clippy lints

This commit is contained in:
Julian Orth 2025-08-29 11:21:04 +02:00
parent e5fd0fa192
commit 9e67158f47
29 changed files with 31 additions and 68 deletions

View file

@ -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)
})