diff options
| author | Jordan Woehr <jordanwoehr@gmail.com> | 2015-03-18 07:43:01 -0600 |
|---|---|---|
| committer | Jordan Woehr <jordanwoehr@gmail.com> | 2015-03-18 07:43:01 -0600 |
| commit | b92fee9a871bbf260201d41b90b40931d995e5c1 (patch) | |
| tree | 63328ddfe602c0c18a2d7a2d5265173742fb2930 | |
| parent | a7f00cbc0cde133bca5fd308fa1df43fa691e68c (diff) | |
| download | rust-b92fee9a871bbf260201d41b90b40931d995e5c1.tar.gz rust-b92fee9a871bbf260201d41b90b40931d995e5c1.zip | |
Remove unnecessary vector creation.
| -rw-r--r-- | src/librustc_trans/trans/asm.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/librustc_trans/trans/asm.rs b/src/librustc_trans/trans/asm.rs index df0d212f9e2..33817bb952e 100644 --- a/src/librustc_trans/trans/asm.rs +++ b/src/librustc_trans/trans/asm.rs @@ -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 @@ -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(","); |
