Skip to content

Commit

Permalink
Remove unnecessary vector creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
woehr committed Mar 18, 2015
1 parent a7f00cb commit b92fee9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/librustc_trans/trans/asm.rs
Expand Up @@ -77,8 +77,7 @@ pub fn trans_inline_asm<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, ia: &ast::InlineAsm)
fcx.pop_custom_cleanup_scope(temp_scope);

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

// Default per-arch clobbers
// Basically what clang does
Expand All @@ -90,8 +89,8 @@ pub fn trans_inline_asm<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, ia: &ast::InlineAsm)
let all_constraints= constraints.iter()
.map(|s| s.to_string())
.chain(ext_constraints.into_iter())
.chain(clobbers.into_iter())
.chain(arch_clobbers.into_iter()
.chain(clobbers)
.chain(arch_clobbers.iter()
.map(|s| s.to_string()))
.collect::<Vec<String>>()
.connect(",");
Expand Down

0 comments on commit b92fee9

Please sign in to comment.