use repeat_n() where available

This commit is contained in:
lapla-cogito 2024-12-21 01:17:50 +09:00
parent 544f71f48d
commit 9a1bbe91bc
No known key found for this signature in database
GPG key ID: B39C71D9F127FF9F
2 changed files with 3 additions and 4 deletions

View file

@ -57,7 +57,7 @@ pub(super) fn check(
diag.span_suggestion_verbose(
span.shrink_to_hi(),
"indent this line",
std::iter::repeat(" ").take(indent).join(""),
std::iter::repeat_n(" ", indent).join(""),
Applicability::MaybeIncorrect,
);
diag.help("if this is supposed to be its own paragraph, add a blank line");