Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure that wgpu::Error is Sync #5820

Merged
merged 2 commits into from
Jun 16, 2024
Merged

Conversation

nolanderc
Copy link
Contributor

Connections
N/A

Description
This PR adds a Sync bound to the boxed std::error::Error within wgpu::Error.
This makes it possible to wrap the error in anyhow::Error and eyre::Report, which require the inner error to be Sync.

Testing
There is a static assertion.

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

This makes it possible to wrap the error in `anyhow::Error` and
`eyre::Report`, which require the inner error to be `Sync`.
@nolanderc nolanderc requested a review from a team as a code owner June 15, 2024 20:19
Copy link
Member

@ErichDonGubler ErichDonGubler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no reason this should be controversial, and it is nice to be compatible with the current error-handling landscape recommended for binaries written in Rust.

@ErichDonGubler ErichDonGubler merged commit fe31966 into gfx-rs:trunk Jun 16, 2024
25 checks passed
FL33TW00D pushed a commit to FL33TW00D/wgpu that referenced this pull request Jun 20, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants