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() { if !suggestion.is_empty() {
write!( write!(
msg, msg,
"no {} target {} `{}` in {}{}", "no {target_desc} target {named} `{target_name}` in {unmatched_packages}{suggestion}",
target_desc, named, target_name, unmatched_packages, suggestion,
)?; )?;
append_targets_elsewhere(&mut msg, "\n")?; append_targets_elsewhere(&mut msg, "\n")?;
} else { } else {
writeln!( writeln!(
msg, msg,
"no {} target {} `{}` in {}.", "no {target_desc} target {named} `{target_name}` in {unmatched_packages}.",
target_desc, named, target_name, unmatched_packages
)?; )?;
append_targets_elsewhere(&mut msg, "")?; append_targets_elsewhere(&mut msg, "")?;