Auto merge of #87449 - matthiaskrgr:clippyy_v2, r=nagisa
more clippy::complexity fixes (also a couple of clippy::perf fixes)
This commit is contained in:
commit
aadd6189ad
32 changed files with 44 additions and 51 deletions
|
@ -357,7 +357,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
if let Ok(expr_text) = self.sess().source_map().span_to_snippet(expr.span) {
|
||||
(expr_text, true)
|
||||
} else {
|
||||
(format!("(..)"), false)
|
||||
("(..)".to_string(), false)
|
||||
};
|
||||
|
||||
let adjusted_text = if let Some(probe::AutorefOrPtrAdjustment::ToConstPtr) =
|
||||
|
|
|
@ -791,7 +791,7 @@ fn fn_sig_suggestion<'tcx>(
|
|||
})
|
||||
})
|
||||
.chain(std::iter::once(if sig.c_variadic { Some("...".to_string()) } else { None }))
|
||||
.filter_map(|arg| arg)
|
||||
.flatten()
|
||||
.collect::<Vec<String>>()
|
||||
.join(", ");
|
||||
let output = sig.output();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue