diff options
author | 2024-01-11 14:45:40 +0000 | |
---|---|---|
committer | 2024-01-11 14:45:40 +0000 | |
commit | 3c6bb0a076c4433abe2a381856250c9d9693404e (patch) | |
tree | f0c33a967a06e0bd0c6c4e89e668947d6d3a81eb | |
parent | fba5326e136c6486bc55e8ba0fed44fe60bb444f (diff) | |
download | iced-3c6bb0a076c4433abe2a381856250c9d9693404e.tar.gz iced-3c6bb0a076c4433abe2a381856250c9d9693404e.tar.bz2 iced-3c6bb0a076c4433abe2a381856250c9d9693404e.zip |
wgpu: require `Send` on stored pipelines
-rw-r--r-- | wgpu/src/primitive/pipeline.rs | 4 |
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)); } |