Not sure if this is worthwile. You may want to suppress the lint
clippy::format_collect instead.
+use std::fmt::Write as _;
use std::iter::once;
use sys_locale::get_locale;
.chain(st.mentions.iter().map(|m| client.fq(&m.acct)))
.filter(|acct| acct != &ourself);
- let text = userids.map(|acct| format!("@{} ", acct)).collect();
+ let text = userids.fold(String::new(), |mut s, acct| {
+ write!(s, "@{} ", acct).expect("fmt to string failed");
+ s
+ });
// Set a default content warning of the same as the post we're
// replying to.