mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 22:11:01 +01:00
1 parent
6c84d438a5
commit
41afbe0111
2 files changed
+17
No files matched your search
@@ -40,6 +40,14 @@ Bottom level categories:
|
||||
|
||||
## Unreleased
|
||||
|
||||
## v0.16.3 (2023-07-17)
|
||||
|
||||
### Changes
|
||||
|
||||
#### General
|
||||
|
||||
- Make the `Id` type that is exposed when using the `expose-ids` feature implement `Send` and `Sync` again. This was unintentionally changed by the v0.16.0 release and is now fixed.
|
||||
|
||||
## v0.16.2 (2023-07-09)
|
||||
|
||||
### Changes
|
||||
|
||||
@@ -4251,6 +4251,15 @@ impl Surface {
|
||||
#[repr(transparent)]
|
||||
pub struct Id<T>(core::num::NonZeroU64, std::marker::PhantomData<*mut T>);
|
||||
|
||||
// SAFETY: `Id` is a bare `NonZeroU64`, the type parameter is a marker purely to avoid confusing Ids
|
||||
// returned for different types , so `Id` can safely implement Send and Sync.
|
||||
#[cfg(feature = "expose-ids")]
|
||||
unsafe impl<T> Send for Id<T> {}
|
||||
|
||||
// SAFETY: See the implementation for `Send`.
|
||||
#[cfg(feature = "expose-ids")]
|
||||
unsafe impl<T> Sync for Id<T> {}
|
||||
|
||||
#[cfg(feature = "expose-ids")]
|
||||
impl<T> Clone for Id<T> {
|
||||
fn clone(&self) -> Self {
|
||||
|
||||
Reference in new issue
Block a user