Skip to content

Commit

Permalink
Merge pull request #2197 from tzemanovic/wgpu-renderer-send
Browse files Browse the repository at this point in the history
wgpu: require `Send` on stored pipelines
  • Loading branch information
hecrj authored Jan 11, 2024
2 parents fba5326 + 3c6bb0a commit 89fc4f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wgpu/src/primitive/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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));
}

Expand Down

0 comments on commit 89fc4f5

Please sign in to comment.