warning: usage of an `Arc` that is not `Send` and `Sync`
--> src/lib.rs:2738:37
|
2738 | temp[i] = Arc::into_raw(Arc::new(WGPUAdapterImpl {
| _____________________________________^
2739 | | context: context.clone(),
2740 | | id: *id,
2741 | | properties: OnceCell::default(),
2742 | | }));
| |______________^
|
= note: `Arc<WGPUAdapterImpl>` is not `Send` and `Sync` as:
= note: - the trait `Sync` is not implemented for `WGPUAdapterImpl`
= help: consider using an `Rc` instead. `Arc` does not provide benefits for non `Send` and `Sync` types
= note: if you intend to use `Arc` with `Send` and `Sync` traits
= note: wrap the inner type with a `Mutex` or implement `Send` and `Sync` for `WGPUAdapterImpl`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
The other types are: WGPUBufferImpl and WGPURenderBundleEncoderImpl.
Not sure what the right fix for this in context, but if there's a good suggestion, I'm happy to submit a PR for it.
Clippy reports 4 instances of this:
The other types are:
WGPUBufferImpl
andWGPURenderBundleEncoderImpl
.Not sure what the right fix for this in context, but if there's a good suggestion, I'm happy to submit a PR for it.