olafurw / poke-fighting-rust

Application that simulates a large grid of Pokémon types fighting each other.
24 stars 3 forks source link

Use TryFromPrimitive attribute instead of a custom implementation #4

Closed palant closed 2 years ago

palant commented 2 years ago

Added one more commit here, replacing num_derive crate with strum. This means that the (trivial) conversion to usize has to be implemented manually, but the POKEMON_COUNT constant no longer needs to be hardcoded.