Remove unused fields in pokedex example

This commit is contained in:
Héctor Ramón Jiménez 2021-12-07 16:13:53 +07:00
parent 37c72793d0
commit fa9fb65ace
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -15,7 +15,6 @@ enum Pokedex {
search: button::State, search: button::State,
}, },
Errored { Errored {
error: Error,
try_again: button::State, try_again: button::State,
}, },
} }
@ -58,9 +57,8 @@ impl Application for Pokedex {
Command::none() Command::none()
} }
Message::PokemonFound(Err(error)) => { Message::PokemonFound(Err(_error)) => {
*self = Pokedex::Errored { *self = Pokedex::Errored {
error,
try_again: button::State::new(), try_again: button::State::new(),
}; };
@ -155,7 +153,6 @@ impl Pokemon {
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
struct Entry { struct Entry {
id: u32,
name: String, name: String,
flavor_text_entries: Vec<FlavorText>, flavor_text_entries: Vec<FlavorText>,
} }