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

Tutorial: Fix broken check for format in match statement #208

Closed
wants to merge 1 commit into from
Closed

Tutorial: Fix broken check for format in match statement #208

wants to merge 1 commit into from

Conversation

dariuswiles
Copy link
Contributor

We want the check to succeed if format is D32_SFLOAT_S8_UINT or D24_UNORM_S8_UINT, so the operator should be logical OR, not bitwise OR.

We want the check to succeed if "format" is D32_SFLOAT_S8_UINT or D24_UNORM_S8_UINT, so the operator should be logical OR, not bitwise OR.
@KyleMayes
Copy link
Owner

The use of | in a match arm results in a pattern, not a bitwise or, so this code is good as it is.
I'll add a note calling this out.

@KyleMayes KyleMayes closed this Sep 23, 2023
@dariuswiles dariuswiles deleted the tutorial-depth-fix-logical-or branch September 23, 2023 21:40
@dariuswiles
Copy link
Contributor Author

I didn't appreciate that Rust match arms work like this and the text you've added is super helpful. Hopefully most other people using your tutorial will have more Rust knowledge than I obviously do!

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