mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-22 23:41:01 +01:00
ignore 'arc instead of rc' warnings on wasm
This commit is contained in:
1 parent
24498f04d4
commit
1bfe8845d5
2 files changed
+7
-1
No files matched your search
@@ -495,7 +495,6 @@ impl Global {
|
||||
surface_per_backend,
|
||||
};
|
||||
|
||||
#[allow(clippy::arc_with_non_send_sync)]
|
||||
let id = self
|
||||
.surfaces
|
||||
.prepare(wgt::Backend::Empty, id_in) // No specific backend for Surface, since it's not specific.
|
||||
|
||||
@@ -62,6 +62,13 @@ the documentation for `wgpu-core` is empty unless built with
|
||||
unused_extern_crates,
|
||||
unused_qualifications
|
||||
)]
|
||||
// We use `Arc` in wgpu-core, but on wasm (unless opted out via `fragile-send-sync-non-atomic-wasm`)
|
||||
// wgpu-hal resources are not Send/Sync, causing a clippy warning for unnecessary `Arc`s.
|
||||
// We could use `Rc`s in this case as recommended, but unless atomics are enabled
|
||||
// this doesn't make a difference.
|
||||
// Therefore, this is only really a concern for users targeting WebGL
|
||||
// (the only reason to use wgpu-core on the web in the first place) that have atomics enabled.
|
||||
#![cfg_attr(not(send_sync), allow(clippy::arc_with_non_send_sync))]
|
||||
|
||||
pub mod binding_model;
|
||||
pub mod command;
|
||||
|
||||
Reference in new issue
Block a user