diff options
author | 2023-02-15 14:55:02 -0800 | |
---|---|---|
committer | 2023-02-15 14:55:02 -0800 | |
commit | 63fb608d8bea8a653bf011f5f9cffc88525576e0 (patch) | |
tree | 938c15b85fd9d27ee3a82806cf83bc211e7b94dd /examples/pokedex | |
parent | 64e0e817c27d720dc954ee94de58ded35b3f9f9a (diff) | |
parent | 0cb72f69716adc82ad85a0ee7120edb6e653b0c0 (diff) | |
download | iced-63fb608d8bea8a653bf011f5f9cffc88525576e0.tar.gz iced-63fb608d8bea8a653bf011f5f9cffc88525576e0.tar.bz2 iced-63fb608d8bea8a653bf011f5f9cffc88525576e0.zip |
Merge remote-tracking branch 'origin/master' into feat/multi-window-support
# Conflicts:
# native/src/command/action.rs
# native/src/window/action.rs
# winit/src/window.rs
Diffstat (limited to 'examples/pokedex')
-rw-r--r-- | examples/pokedex/src/main.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/pokedex/src/main.rs b/examples/pokedex/src/main.rs index 4fe2d07c..748acae0 100644 --- a/examples/pokedex/src/main.rs +++ b/examples/pokedex/src/main.rs @@ -41,7 +41,7 @@ impl Application for Pokedex { Pokedex::Errored { .. } => "Whoops!", }; - format!("{} - Pokédex", subtitle) + format!("{subtitle} - Pokédex") } fn update(&mut self, message: Message) -> Command<Message> { @@ -157,8 +157,7 @@ impl Pokemon { }; let fetch_entry = async { - let url = - format!("https://pokeapi.co/api/v2/pokemon-species/{}", id); + let url = format!("https://pokeapi.co/api/v2/pokemon-species/{id}"); reqwest::get(&url).await?.json().await }; @@ -187,8 +186,7 @@ impl Pokemon { async fn fetch_image(id: u16) -> Result<image::Handle, reqwest::Error> { let url = format!( - "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/{}.png", - id + "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/{id}.png" ); #[cfg(not(target_arch = "wasm32"))] |