Fix: Clippy lint 'uninlined_format_args'

This commit is contained in:
13r0ck 2023-01-27 13:25:04 -07:00
parent e6092e81a4
commit 42b1bfe66d
25 changed files with 47 additions and 54 deletions

View file

@ -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"))]