aboutsummaryrefslogtreecommitdiff
path: root/stockton-render/src/draw/texture/repo.rs
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-08-25 17:44:23 +0100
committertcmal <me@aria.rip>2024-08-25 17:44:23 +0100
commitc52a05e6d3977efce6bd4479aa312dc90e0452e5 (patch)
treec383c910c1467b406e332651906e081c599d6951 /stockton-render/src/draw/texture/repo.rs
parentd5b9ccd3d4a6e5b35a0411688bfb7113f5c7d631 (diff)
feat(render): proper error handling
Diffstat (limited to 'stockton-render/src/draw/texture/repo.rs')
-rw-r--r--stockton-render/src/draw/texture/repo.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/stockton-render/src/draw/texture/repo.rs b/stockton-render/src/draw/texture/repo.rs
index d5200be..8191f7b 100644
--- a/stockton-render/src/draw/texture/repo.rs
+++ b/stockton-render/src/draw/texture/repo.rs
@@ -129,8 +129,11 @@ impl<'a> TextureRepo<'a> {
})
}
- pub fn get_ds_layout(&self) -> RwLockReadGuard<DescriptorSetLayoutT> {
- self.ds_layout.read().unwrap()
+ pub fn get_ds_layout(&self) -> Result<RwLockReadGuard<DescriptorSetLayoutT>> {
+ self.ds_layout
+ .read()
+ .map_err(|_| LockPoisoned::Other)
+ .context("Error locking descriptor set layout")
}
pub fn queue_load(&mut self, block_id: BlockRef) -> Result<()> {