diff options
author | tcmal <me@aria.rip> | 2024-08-25 17:44:24 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-25 17:44:24 +0100 |
commit | 5360fe6a337145b2640ec1e5727c97fd9bbeacd9 (patch) | |
tree | 264f4cda45b001fb5049b9120d4d7b3a63c95e6f /stockton-skeleton/src/context.rs | |
parent | 0ddc1e39dc24cff636defbbbab974967bb5301b8 (diff) |
refactor(all): small fixes
Diffstat (limited to 'stockton-skeleton/src/context.rs')
-rw-r--r-- | stockton-skeleton/src/context.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stockton-skeleton/src/context.rs b/stockton-skeleton/src/context.rs index bbd0164..d1997d3 100644 --- a/stockton-skeleton/src/context.rs +++ b/stockton-skeleton/src/context.rs @@ -285,12 +285,13 @@ impl RenderingContext { } /// Get the specified memory pool, lazily initialising it if it's not yet present - pub fn memory_pool<'a, P: MemoryPool>(&'a mut self) -> Result<&'a Arc<RwLock<P>>> { + pub fn memory_pool<P: MemoryPool>(&mut self) -> Result<&Arc<RwLock<P>>> { self.ensure_memory_pool::<P>()?; Ok(self.existing_memory_pool::<P>().unwrap()) } /// Ensure the specified memory pool is initialised. + #[allow(clippy::map_entry)] // We can't follow the suggestion because of a borrowing issue pub fn ensure_memory_pool<P: MemoryPool>(&mut self) -> Result<()> { let tid = TypeId::of::<P>(); if !self.memory_pools.contains_key(&tid) { |