Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upamethyst_animation::util::get_animation_set panics if Entity is dead. #686
Comments
Rhuagh
added
type: bug
diff: easy
pri: low
project: animation
labels
Apr 30, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
May 17, 2018
Member
I'm adding this issue for first-time contributors. Here's a more detailed description of the issue:
The following function is using an unwrap on the Result of entry. In case the Entity is dead, the result is an error and the unwrap will make the function panic.
amethyst/amethyst_animation/src/util.rs
Lines 15 to 27 in 6484af2
Your task is to evaluate whether the function should return an Option or a Result and replace the unwrap accordingly. If you're interested in fixing this issue or you need help with something, please comment here.
There's a rough overview of the animation crate available in our book.
|
I'm adding this issue for first-time contributors. Here's a more detailed description of the issue: The following function is using an amethyst/amethyst_animation/src/util.rs Lines 15 to 27 in 6484af2 Your task is to evaluate whether the function should return an There's a rough overview of the animation crate available in our book. |
torkleyy
added
the
good first issue
label
May 17, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
hashedone
Jun 22, 2018
Contributor
I don't think, that returning Result makes sense here, as long, as only information available in Err is actual_gen. Am I right?
|
I don't think, that returning |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Xaeroxe
Jun 22, 2018
Member
It's the only information we have and I don't see much harm in returning a Result
|
It's the only information we have and I don't see much harm in returning a Result |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
I made a correction and submitted pull request for this. |
Xaeroxe commentedApr 30, 2018
See this: https://github.com/amethyst/amethyst/pull/684/files/8696588889e44cc42f8b5e0e851d3ce9f8557df3#r185024799
for more detail.