clippy::perf fixes
This commit is contained in:
parent
4961b107f2
commit
28ef4169cc
9 changed files with 13 additions and 13 deletions
|
@ -1838,7 +1838,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
post.iter().map(|p| format!("- {}", p)).take(4).collect::<Vec<_>>().join("\n"),
|
||||
post.len() - 4,
|
||||
)
|
||||
} else if post.len() > 1 || (post.len() == 1 && post[0].contains("\n")) {
|
||||
} else if post.len() > 1 || (post.len() == 1 && post[0].contains('\n')) {
|
||||
format!(":\n{}", post.iter().map(|p| format!("- {}", p)).collect::<Vec<_>>().join("\n"),)
|
||||
} else if post.len() == 1 {
|
||||
format!(": `{}`", post[0])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue