mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 08:13:27 +00:00
ensure that wgpu::Error
is Sync
(#5820)
* ensure that `wgpu::Error` is `Sync` This makes it possible to wrap the error in `anyhow::Error` and `eyre::Report`, which require the inner error to be `Sync`. * update changelog
This commit is contained in:
parent
e78c33b309
commit
fe31966fdf
@ -134,6 +134,7 @@ By @atlv24 in [#5383](https://github.com/gfx-rs/wgpu/pull/5383)
|
||||
#### General
|
||||
|
||||
- Avoid introducing spurious features for optional dependencies. By @bjorn3 in [#5691](https://github.com/gfx-rs/wgpu/pull/5691)
|
||||
- `wgpu::Error` is now `Sync`, making it possible to be wrapped in `anyhow::Error` or `eyre::Report`. By @nolanderc in [#5820](https://github.com/gfx-rs/wgpu/pull/5820)
|
||||
|
||||
#### Metal
|
||||
- Removed the `link` Cargo feature.
|
||||
|
@ -5873,7 +5873,7 @@ pub enum Error {
|
||||
/// Lower level source of the error.
|
||||
#[cfg(send_sync)]
|
||||
#[cfg_attr(docsrs, doc(cfg(all())))]
|
||||
source: Box<dyn error::Error + Send + 'static>,
|
||||
source: Box<dyn error::Error + Send + Sync + 'static>,
|
||||
/// Lower level source of the error.
|
||||
#[cfg(not(send_sync))]
|
||||
#[cfg_attr(docsrs, doc(cfg(all())))]
|
||||
@ -5884,7 +5884,7 @@ pub enum Error {
|
||||
/// Lower level source of the error.
|
||||
#[cfg(send_sync)]
|
||||
#[cfg_attr(docsrs, doc(cfg(all())))]
|
||||
source: Box<dyn error::Error + Send + 'static>,
|
||||
source: Box<dyn error::Error + Send + Sync + 'static>,
|
||||
/// Lower level source of the error.
|
||||
#[cfg(not(send_sync))]
|
||||
#[cfg_attr(docsrs, doc(cfg(all())))]
|
||||
@ -5899,7 +5899,7 @@ pub enum Error {
|
||||
/// Lower level source of the error.
|
||||
#[cfg(send_sync)]
|
||||
#[cfg_attr(docsrs, doc(cfg(all())))]
|
||||
source: Box<dyn error::Error + Send + 'static>,
|
||||
source: Box<dyn error::Error + Send + Sync + 'static>,
|
||||
/// Lower level source of the error.
|
||||
#[cfg(not(send_sync))]
|
||||
#[cfg_attr(docsrs, doc(cfg(all())))]
|
||||
@ -5909,7 +5909,7 @@ pub enum Error {
|
||||
},
|
||||
}
|
||||
#[cfg(send_sync)]
|
||||
static_assertions::assert_impl_all!(Error: Send);
|
||||
static_assertions::assert_impl_all!(Error: Send, Sync);
|
||||
|
||||
impl error::Error for Error {
|
||||
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
|
||||
|
Loading…
Reference in New Issue
Block a user