Simplify code.

This commit is contained in:
Stephen Chung
2023-02-28 22:33:44 +08:00
parent 9a5221f60d
commit 86ccb37029
10 changed files with 28 additions and 78 deletions

View File

@@ -63,8 +63,8 @@ impl Caches {
#[inline]
#[must_use]
pub fn fn_resolution_cache_mut(&mut self) -> &mut FnResolutionCache {
// Push a new function resolution cache if the stack is empty
if self.0.is_empty() {
// Push a new function resolution cache if the stack is empty
self.push_fn_resolution_cache();
}
self.0.last_mut().unwrap()