-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[Merged by Bors] - Change From<Icosphere>
to TryFrom<Icosphere>
#6484
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great new error type!
The .expect
s should be replaced by .unwrap
: the error returned will be better than a simple string and it's easier to maintain and read.
From<Icosphere> to TryFrom<Icosphere>
From<Icosphere>
to TryFrom<Icosphere>
bors r+ |
# Objective - Fixes #6476 ## Solution - Return error instead of panic through `TryFrom` - ~~Add `.except()` in examples~~ - Add `.unwrap()` in examples
Pull request successfully merged into main. Build succeeded:
|
From<Icosphere>
to TryFrom<Icosphere>
From<Icosphere>
to TryFrom<Icosphere>
# Objective - Fixes bevyengine#6476 ## Solution - Return error instead of panic through `TryFrom` - ~~Add `.except()` in examples~~ - Add `.unwrap()` in examples
# Objective - Fixes bevyengine#6476 ## Solution - Return error instead of panic through `TryFrom` - ~~Add `.except()` in examples~~ - Add `.unwrap()` in examples
# Objective - Fixes bevyengine#6476 ## Solution - Return error instead of panic through `TryFrom` - ~~Add `.except()` in examples~~ - Add `.unwrap()` in examples
Objective
clippy::fallible-impl-from
forFrom<Icosphere> for Mesh
#6476Solution
TryFrom
Add.except()
in examples.unwrap()
in examples