From 1d30c08b78e1dac49eb9c5c7d40acdefb786a077 Mon Sep 17 00:00:00 2001 From: TheOnlyMrCat Date: Fri, 4 Nov 2022 05:49:35 +1100 Subject: [PATCH] Fully qualify atomics --- wgpu/src/backend/web.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wgpu/src/backend/web.rs b/wgpu/src/backend/web.rs index 8c555a8fae1..79f9ee96ef1 100644 --- a/wgpu/src/backend/web.rs +++ b/wgpu/src/backend/web.rs @@ -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, @@ -47,7 +45,7 @@ impl crate::GlobalId for Identified { 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(value: T) -> Identified { @@ -56,7 +54,7 @@ fn create_identified(value: T) -> Identified { #[cfg(feature = "expose-ids")] fn create_identified(value: T) -> Identified { - 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);