1
Fork 0

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:
bors 2021-08-01 09:15:15 +00:00
commit aadd6189ad
32 changed files with 44 additions and 51 deletions

View file

@ -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) =

View file

@ -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();