Merge pull request #2197 from tzemanovic/wgpu-renderer-send
wgpu: require `Send` on stored pipelines
This commit is contained in:
commit
89fc4f54bd
1 changed files with 2 additions and 2 deletions
|
|
@ -82,7 +82,7 @@ impl<Theme> Renderer for crate::Renderer<Theme> {
|
||||||
/// Stores custom, user-provided pipelines.
|
/// Stores custom, user-provided pipelines.
|
||||||
#[derive(Default, Debug)]
|
#[derive(Default, Debug)]
|
||||||
pub struct Storage {
|
pub struct Storage {
|
||||||
pipelines: HashMap<TypeId, Box<dyn Any>>,
|
pipelines: HashMap<TypeId, Box<dyn Any + Send>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Storage {
|
impl Storage {
|
||||||
|
|
@ -92,7 +92,7 @@ impl Storage {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Inserts the pipeline `T` in to [`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));
|
let _ = self.pipelines.insert(TypeId::of::<T>(), Box::new(pipeline));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue