-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Replace unwrap
calls with expect
in bevy_sprite
crate
#4043
Replace unwrap
calls with expect
in bevy_sprite
crate
#4043
Conversation
unwrap
calls with expect
in bevy_sprite
crate
Should I use the following pattern (suggested by foobar.unwrap_or_else(|_| panic!(/* ... */)) |
Also, I was trying to display |
Please do, otherwise there will be a String allocated even when there isn't an error. |
Closing per discussion in #3899 <3 |
Objective
unwrap
withexpect
#3899 forbevy_sprite
crate.Solution
unwrap
calls withexpect
calls and added comprehensive error messages when these statements panic.Feel free to review the error messages and provide suggestions on how they could be made clearer.