simplify some stuff

This commit is contained in:
Simon Gardling
2022-02-26 12:55:29 -05:00
parent c20ea511ba
commit 13c694f977
2 changed files with 2 additions and 16 deletions

View File

@@ -147,12 +147,7 @@ impl<T> Cache<T> {
pub fn invalidate(&mut self) { self.backing_data = None; }
#[inline]
pub fn is_valid(&self) -> bool {
match &self.backing_data {
Some(_) => true,
None => false,
}
}
pub fn is_valid(&self) -> bool { self.backing_data.is_some() }
}
// Tests to make sure my cursed function works as intended