summaryrefslogtreecommitdiffstats
path: root/examples/pokedex
diff options
context:
space:
mode:
authorLibravatar 13r0ck <brock@szu.email>2023-01-27 13:25:04 -0700
committerLibravatar 13r0ck <brock@szu.email>2023-01-27 14:02:48 -0700
commit42b1bfe66d2407901c1ae640f80ce9e0d3c64b60 (patch)
tree2057c57df0c36096d1c3cd6334bc16e767f8169e /examples/pokedex
parente6092e81a42efe0bbaaad2e7ce475c25a379e672 (diff)
downloadiced-42b1bfe66d2407901c1ae640f80ce9e0d3c64b60.tar.gz
iced-42b1bfe66d2407901c1ae640f80ce9e0d3c64b60.tar.bz2
iced-42b1bfe66d2407901c1ae640f80ce9e0d3c64b60.zip
Fix: Clippy lint 'uninlined_format_args'
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"))]