Commit d0488472 authored by Rahix's avatar Rahix 🦀
Browse files

sprites: Just convert the enum to an integer directly

No match needed, for simple enums one can just convert them to their
integer discriminant with `as <int-type>`.
parent 12965887
...@@ -29,8 +29,6 @@ impl Sprite { ...@@ -29,8 +29,6 @@ impl Sprite {
impl Into<resources::ImageHandle> for Sprite { impl Into<resources::ImageHandle> for Sprite {
fn into(self) -> resources::ImageHandle { fn into(self) -> resources::ImageHandle {
resources::ImageHandle(match self { resources::ImageHandle(self as usize)
Sprite::Player => 1,
})
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment