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

impl Clone for WithSpan<E> #1620

Merged
merged 1 commit into from
Dec 21, 2021
Merged

Conversation

jakobhellermann
Copy link
Contributor

I wanted to create a CreateShaderModuleError from a &WithSpan<ValidationError> to reuse wgpu's shader error formatting, but that isn't possible right now because WithSpan can't be cloned and you can't get an &E from &WithSpan<E>.

Solution: #[derive(Clone)]

@kvark kvark enabled auto-merge (squash) December 21, 2021 20:13
@kvark kvark added the can backport PR that can be back-ported to a release branch label Dec 21, 2021
@kvark kvark merged commit 54178de into gfx-rs:master Dec 21, 2021
@jakobhellermann jakobhellermann deleted the with-span-clone branch December 21, 2021 20:16
kvark pushed a commit to kvark/naga that referenced this pull request Dec 29, 2021
@kvark kvark mentioned this pull request Dec 29, 2021
@kvark
Copy link
Member

kvark commented Dec 29, 2021

published in 0.8.1

@kvark kvark removed the can backport PR that can be back-ported to a release branch label Dec 29, 2021
kvark pushed a commit that referenced this pull request Dec 29, 2021
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