Skip to content

Commit

Permalink
Fully qualify atomics
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOnlyMrCat committed Nov 3, 2022
1 parent 9fbd0ad commit 1d30c08
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions wgpu/src/backend/web.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#![allow(clippy::type_complexity)]

use js_sys::Promise;
#[cfg(feature = "expose-ids")]
use std::sync::atomic::{self, AtomicU64};
use std::{
cell::RefCell,
fmt,
Expand Down Expand Up @@ -47,7 +45,7 @@ impl<T> crate::GlobalId for Identified<T> {
pub(crate) type Id = u64;

#[cfg(feature = "expose-ids")]
static NEXT_ID: AtomicU64 = AtomicU64::new(0);
static NEXT_ID: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0);

#[cfg(not(feature = "expose-ids"))]
fn create_identified<T>(value: T) -> Identified<T> {
Expand All @@ -56,7 +54,7 @@ fn create_identified<T>(value: T) -> Identified<T> {

#[cfg(feature = "expose-ids")]
fn create_identified<T>(value: T) -> Identified<T> {
Identified(value, NEXT_ID.fetch_add(1, atomic::Ordering::Relaxed))
Identified(value, NEXT_ID.fetch_add(1, std::sync::atomic::Ordering::Relaxed))
}

pub(crate) struct Context(web_sys::Gpu);
Expand Down

0 comments on commit 1d30c08

Please sign in to comment.