Skip to content

Commit b92fee9

Browse files
committed
Remove unnecessary vector creation.
1 parent a7f00cb commit b92fee9

File tree

1 file changed

+3
-4
lines changed
  • src/librustc_trans/trans

1 file changed

+3
-4
lines changed

src/librustc_trans/trans/asm.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ pub fn trans_inline_asm<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, ia: &ast::InlineAsm)
7777
fcx.pop_custom_cleanup_scope(temp_scope);
7878

7979
let clobbers = ia.clobbers.iter()
80-
.map(|s| format!("~{{{}}}", &s))
81-
.collect::<Vec<String>>();
80+
.map(|s| format!("~{{{}}}", &s));
8281

8382
// Default per-arch clobbers
8483
// Basically what clang does
@@ -90,8 +89,8 @@ pub fn trans_inline_asm<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, ia: &ast::InlineAsm)
9089
let all_constraints= constraints.iter()
9190
.map(|s| s.to_string())
9291
.chain(ext_constraints.into_iter())
93-
.chain(clobbers.into_iter())
94-
.chain(arch_clobbers.into_iter()
92+
.chain(clobbers)
93+
.chain(arch_clobbers.iter()
9594
.map(|s| s.to_string()))
9695
.collect::<Vec<String>>()
9796
.connect(",");

0 commit comments

Comments
 (0)