Inline format arguments

This feature has been stable since Rust 1.58.0.
This commit is contained in:
link2xt
2023-01-30 08:37:17 +00:00
parent c911f1262a
commit fcf73165ed
58 changed files with 357 additions and 435 deletions

View File

@@ -207,7 +207,7 @@ impl HtmlMsgParser {
self.html = re
.replace_all(
&self.html,
format!("${{1}}{}${{3}}", replacement).as_str(),
format!("${{1}}{replacement}${{3}}").as_str(),
)
.as_ref()
.to_string()
@@ -561,7 +561,7 @@ test some special html-characters as < > and & but also " and &#x
assert!(msg.text.as_ref().unwrap().contains("foo bar ä ö ü ß"));
assert!(msg.has_html());
let html = msg.get_id().get_html(&t).await?.unwrap();
println!("{}", html);
println!("{html}");
assert!(html.contains("foo bar ä ö ü ß"));
Ok(())
}