Fix rust-2018-idioms warnings

This commit is contained in:
Luis Moreno
2020-11-08 20:24:08 -04:00
parent ea5de9758a
commit 54886ebd72
15 changed files with 29 additions and 38 deletions
+1 -1
View File
@@ -469,7 +469,7 @@ impl<T: Clone> Cache<T> {
}
}
fn get<F: Fn() -> Vec<T>>(&self, i: usize, or: F) -> Ref<Vec<T>> {
fn get<F: Fn() -> Vec<T>>(&self, i: usize, or: F) -> Ref<'_, Vec<T>> {
if self.data[i].borrow().is_none() {
self.data[i].replace(Some(or()));
}