replace Registry.read().get_owned() with Registry.get()

This commit is contained in:
teoxoy authored and Teodor Tanasoaia committed 2024-07-03 15:01:41 +02:00
1 parent 3df4c8a502
commit addd80ccd3
1 file changed
+4 -8
+4 -8
View File
@@ -2762,8 +2762,7 @@ impl Global {
let hub = A::hub(self);
let buffer = hub
.buffers
.read()
.get_owned(buffer_id)
.get(buffer_id)
.map_err(|_| RenderPassErrorInner::InvalidBuffer(buffer_id))
.map_pass_err(scope)?;
@@ -2778,8 +2777,7 @@ impl Global {
let hub = A::hub(self);
let query_set = hub
.query_sets
.read()
.get_owned(query_set_id)
.get(query_set_id)
.map_err(|_| RenderPassErrorInner::InvalidQuerySet(query_set_id))
.map_pass_err(scope)?;
@@ -2813,8 +2811,7 @@ impl Global {
let hub = A::hub(self);
let bind_group = hub
.bind_groups
.read()
.get_owned(bind_group_id)
.get(bind_group_id)
.map_err(|_| RenderPassErrorInner::InvalidBindGroup(index))
.map_pass_err(scope)?;
@@ -2845,8 +2842,7 @@ impl Global {
let hub = A::hub(self);
let pipeline = hub
.render_pipelines
.read()
.get_owned(pipeline_id)
.get(pipeline_id)
.map_err(|_| RenderPassErrorInner::InvalidPipeline(pipeline_id))
.map_pass_err(scope)?;