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

Fix formatting of TextureDimensionError::LimitExceeded. #2799

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

kpreid
Copy link
Contributor

@kpreid kpreid commented Jun 22, 2022

Description
in the thiserror error format string, {0:?} ends up referring to the first named argument, not the first struct field or a compile error, so the error was incorrectly

Dimension 32768 value 32768 exceeds the limit of 16384

instead of

Dimension X value 32768 exceeds the limit of 16384

I did not find any other occurrences of this mistake in the source code.

Testing
Manually tested by modifying an example to throw this error. I did not notice any other error message tests, so I didn't add one, but I'm happy to do so if that would be desired.

in the thiserror error format string, `{0:?}` ends up referring to the
first named argument, not the first struct field or a compile error, so
the error was incorrectly
    Dimension 32768 value 32768 exceeds the limit of 16384
instead of
    Dimension X value 32768 exceeds the limit of 16384
Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Thanks!

@cwfitzgerald cwfitzgerald merged commit 2881a74 into gfx-rs:master Jun 22, 2022
atadier pushed a commit to atadier/wgpu that referenced this pull request Jun 23, 2022
in the thiserror error format string, `{0:?}` ends up referring to the
first named argument, not the first struct field or a compile error, so
the error was incorrectly
    Dimension 32768 value 32768 exceeds the limit of 16384
instead of
    Dimension X value 32768 exceeds the limit of 16384
@kpreid kpreid deleted the dimerror branch July 2, 2022 15:10
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