refactor(compile): Use string interpolation

This commit is contained in:
Ed Page 2025-03-11 11:15:00 -05:00
parent 5375c3f60d
commit 54dd94b49b

View File

@ -311,15 +311,13 @@ impl<'a> UnitGenerator<'a, '_> {
if !suggestion.is_empty() {
write!(
msg,
"no {} target {} `{}` in {}{}",
target_desc, named, target_name, unmatched_packages, suggestion,
"no {target_desc} target {named} `{target_name}` in {unmatched_packages}{suggestion}",
)?;
append_targets_elsewhere(&mut msg, "\n")?;
} else {
writeln!(
msg,
"no {} target {} `{}` in {}.",
target_desc, named, target_name, unmatched_packages
"no {target_desc} target {named} `{target_name}` in {unmatched_packages}.",
)?;
append_targets_elsewhere(&mut msg, "")?;