summaryrefslogtreecommitdiffstats
path: root/wgpu
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-01-11 17:07:48 +0100
committerLibravatar GitHub <noreply@github.com>2024-01-11 17:07:48 +0100
commit89fc4f54bdbf62a29fcd06bc2e77926180143413 (patch)
treef0c33a967a06e0bd0c6c4e89e668947d6d3a81eb /wgpu
parentfba5326e136c6486bc55e8ba0fed44fe60bb444f (diff)
parent3c6bb0a076c4433abe2a381856250c9d9693404e (diff)
downloadiced-89fc4f54bdbf62a29fcd06bc2e77926180143413.tar.gz
iced-89fc4f54bdbf62a29fcd06bc2e77926180143413.tar.bz2
iced-89fc4f54bdbf62a29fcd06bc2e77926180143413.zip
Merge pull request #2197 from tzemanovic/wgpu-renderer-send
wgpu: require `Send` on stored pipelines
Diffstat (limited to '')
-rw-r--r--wgpu/src/primitive/pipeline.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/wgpu/src/primitive/pipeline.rs b/wgpu/src/primitive/pipeline.rs
index 302e38f6..c8e45458 100644
--- a/wgpu/src/primitive/pipeline.rs
+++ b/wgpu/src/primitive/pipeline.rs
@@ -82,7 +82,7 @@ impl<Theme> Renderer for crate::Renderer<Theme> {
/// Stores custom, user-provided pipelines.
#[derive(Default, Debug)]
pub struct Storage {
- pipelines: HashMap<TypeId, Box<dyn Any>>,
+ pipelines: HashMap<TypeId, Box<dyn Any + Send>>,
}
impl Storage {
@@ -92,7 +92,7 @@ impl Storage {
}
/// Inserts the pipeline `T` in to [`Storage`].
- pub fn store<T: 'static>(&mut self, pipeline: T) {
+ pub fn store<T: 'static + Send>(&mut self, pipeline: T) {
let _ = self.pipelines.insert(TypeId::of::<T>(), Box::new(pipeline));
}