aboutsummaryrefslogtreecommitdiff
path: root/stockton-skeleton/src/context.rs
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-08-25 17:44:24 +0100
committertcmal <me@aria.rip>2024-08-25 17:44:24 +0100
commit5360fe6a337145b2640ec1e5727c97fd9bbeacd9 (patch)
tree264f4cda45b001fb5049b9120d4d7b3a63c95e6f /stockton-skeleton/src/context.rs
parent0ddc1e39dc24cff636defbbbab974967bb5301b8 (diff)
refactor(all): small fixes
Diffstat (limited to 'stockton-skeleton/src/context.rs')
-rw-r--r--stockton-skeleton/src/context.rs3
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) {