use vec![] macro to create Vector with first item inside instead of pushing to an empty vec![]
slightly reduces code bloat
This commit is contained in:
parent
71a6c7c803
commit
1c129f7b97
4 changed files with 7 additions and 9 deletions
|
@ -2189,8 +2189,7 @@ impl<'a> State<'a> {
|
|||
Options(InlineAsmOptions),
|
||||
}
|
||||
|
||||
let mut args = vec![];
|
||||
args.push(AsmArg::Template(InlineAsmTemplatePiece::to_string(&asm.template)));
|
||||
let mut args = vec![AsmArg::Template(InlineAsmTemplatePiece::to_string(&asm.template))];
|
||||
args.extend(asm.operands.iter().map(|(o, _)| AsmArg::Operand(o)));
|
||||
if !asm.options.is_empty() {
|
||||
args.push(AsmArg::Options(asm.options));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue