mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-16 08:53:20 +00:00
ignore 'arc instead of rc' warnings on wasm
This commit is contained in:
parent
24498f04d4
commit
1bfe8845d5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user