summaryrefslogtreecommitdiffstats
path: root/examples/pokedex
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-01-28 18:34:14 +0100
committerLibravatar GitHub <noreply@github.com>2023-01-28 18:34:14 +0100
commitcffffff2ddffc6e8d4e430c94ba9d89e4acda44c (patch)
tree2057c57df0c36096d1c3cd6334bc16e767f8169e /examples/pokedex
parent818ae4977a36c30a61492f85afa96e261c5d7167 (diff)
parent42b1bfe66d2407901c1ae640f80ce9e0d3c64b60 (diff)
downloadiced-cffffff2ddffc6e8d4e430c94ba9d89e4acda44c.tar.gz
iced-cffffff2ddffc6e8d4e430c94ba9d89e4acda44c.tar.bz2
iced-cffffff2ddffc6e8d4e430c94ba9d89e4acda44c.zip
Merge pull request #1681 from pop-os/fix-lints
Fix Clippy Lints
Diffstat (limited to 'examples/pokedex')
-rw-r--r--examples/pokedex/src/main.rs8
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"))]