migrate some more code to mu_format / join_paths
Let's modernize a bit.
This commit is contained in:
@ -95,7 +95,7 @@ guess_nick(const Contact& contact)
|
||||
nicks.emplace(nick, 0);
|
||||
else {
|
||||
++it->second;
|
||||
nick = format("%s%zu", nick.c_str(), ++it->second);
|
||||
nick = mu_format("{}{}", nick, ++it->second);
|
||||
}
|
||||
|
||||
return nick;
|
||||
|
||||
@ -38,7 +38,7 @@ save_part(const Message::Part& part, size_t idx, const Options& opts)
|
||||
* cooking */
|
||||
const auto path{targetdir +
|
||||
part.cooked_filename(opts.extract.uncooked)
|
||||
.value_or(format("part-%zu", idx))};
|
||||
.value_or(mu_format("part-{}", idx))};
|
||||
|
||||
if (auto&& res{part.to_file(path, opts.extract.overwrite)}; !res)
|
||||
return Err(res.error());
|
||||
|
||||
Reference in New Issue
Block a user