Replace push loops with collect() and extend() where possible
This commit is contained in:
parent
a5c2d0fffa
commit
59c8a279da
28 changed files with 101 additions and 150 deletions
|
@ -352,9 +352,10 @@ pub fn create_function_debug_context<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>,
|
|||
|
||||
if sig.abi == Abi::RustCall && !sig.inputs().is_empty() {
|
||||
if let ty::TyTuple(args) = sig.inputs()[sig.inputs().len() - 1].sty {
|
||||
for &argument_type in args {
|
||||
signature.push(type_metadata(cx, argument_type, syntax_pos::DUMMY_SP));
|
||||
}
|
||||
signature.extend(
|
||||
args.iter().map(|argument_type|
|
||||
type_metadata(cx, argument_type, syntax_pos::DUMMY_SP))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue