style: simplify string interpolation

This commit is contained in:
Hamir Mahal 2024-05-30 16:18:49 -07:00
parent b32f181f47
commit 7c34eb3880
No known key found for this signature in database
43 changed files with 71 additions and 78 deletions

View file

@ -172,7 +172,7 @@ pub fn ty_alias(
assignment: Option<(ast::Type, Option<ast::WhereClause>)>,
) -> ast::TypeAlias {
let mut s = String::new();
s.push_str(&format!("type {}", ident));
s.push_str(&format!("type {ident}"));
if let Some(list) = generic_param_list {
s.push_str(&list.to_string());
@ -297,7 +297,7 @@ pub fn impl_trait(
};
let where_clause = merge_where_clause(ty_where_clause, trait_where_clause)
.map_or_else(|| " ".to_owned(), |wc| format!("\n{}\n", wc));
.map_or_else(|| " ".to_owned(), |wc| format!("\n{wc}\n"));
let body = match body {
Some(bd) => bd.iter().map(|elem| elem.to_string()).join(""),