mirror of
https://framagit.org/veretcle/scootaloo.git
synced 2025-07-21 17:34:37 +02:00
refactor: conforms to clippy 1.67 recommandations
This commit is contained in:
@@ -83,7 +83,7 @@ pub fn associate_urls(urls: &[UrlEntity], re: &Option<Regex>) -> HashMap<String,
|
||||
pub fn replace_alt_services(urls: &mut HashMap<String, String>, alts: &HashMap<String, String>) {
|
||||
for val in urls.values_mut() {
|
||||
for (k, v) in alts {
|
||||
*val = val.replace(&format!("/{}/", k), &format!("/{}/", v));
|
||||
*val = val.replace(&format!("/{k}/"), &format!("/{v}/"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -120,7 +120,7 @@ pub fn replace_tweet_by_toot(
|
||||
twitter_screen_name.to_lowercase(),
|
||||
tweet_id
|
||||
)) {
|
||||
*val = format!("{}/@{}/{}", base_url, mastodon_screen_name, toot_id);
|
||||
*val = format!("{base_url}/@{mastodon_screen_name}/{toot_id}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -184,7 +184,7 @@ pub async fn register(host: &str, screen_name: &str) {
|
||||
|
||||
let url = app_data.url.expect("Cannot generate registration URI!");
|
||||
|
||||
println!("Click this link to authorize on Mastodon: {}", url);
|
||||
println!("Click this link to authorize on Mastodon: {url}");
|
||||
println!("Paste the returned authorization code: ");
|
||||
|
||||
let mut input = String::new();
|
||||
|
Reference in New Issue
Block a user