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

refactor: use include_wgsl!(…) more #6326

Merged

Conversation

ErichDonGubler
Copy link
Member

@ErichDonGubler ErichDonGubler commented Sep 25, 2024

Connections

-

Description

This change uses include_wgsl!(…) in usages where an include_str!("….wgsl") was used to construct
a ShaderModuleDescriptor's source, but the labelwas set toNone`. This should (1) showcase a nice idiomatic convenience we offer in our examples better, (2) make code more concise, and (3) get some automatically generated labels in diagnostics where it seems it won't hurt.

Testing

CI still passes!

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.

@ErichDonGubler ErichDonGubler force-pushed the erichdongubler/push-koqlsxvqwkvo branch 2 times, most recently from db77d2a to e0c5eaf Compare September 25, 2024 20:00
This change uses `include_wgsl!(…)` in usages where an
`include_str!("….wgsl")` was used to construct
a `ShaderModuleDescriptor`'s `source, but the `label` was set to `None`.
This should (1) showcase a nice idiomatic convenience we offer in our
examples better, (2) make code more concise, and (3) get some
automatically generated labels in diagnostics where it seems it won't
hurt.
@ErichDonGubler ErichDonGubler marked this pull request as ready for review September 25, 2024 20:07
@ErichDonGubler ErichDonGubler requested a review from a team as a code owner September 25, 2024 20:07
@nical nical merged commit 765c202 into gfx-rs:trunk Sep 26, 2024
27 checks passed
@ErichDonGubler ErichDonGubler deleted the erichdongubler/push-koqlsxvqwkvo branch September 28, 2024 16:43
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