diff options
| author | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2012-10-18 09:14:11 -0700 |
|---|---|---|
| committer | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2012-10-18 10:09:57 -0700 |
| commit | a7ecde33238f46ae473ceb63db95068f1ce6cffd (patch) | |
| tree | 957aa88a448120578a5e503c874a9b7fa90e5e47 /src/rustc/back | |
| parent | 95423d28f221ac67bad7e7c6396b983705a056ae (diff) | |
| download | rust-a7ecde33238f46ae473ceb63db95068f1ce6cffd.tar.gz rust-a7ecde33238f46ae473ceb63db95068f1ce6cffd.zip | |
libcore: minor code cleanup.
This is minor and probably completely inconsequential to performance, but I find vec::map to be more clear than vec::each and a push.
Diffstat (limited to 'src/rustc/back')
| -rw-r--r-- | src/rustc/back/upcall.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rustc/back/upcall.rs b/src/rustc/back/upcall.rs index a2c864f6f46..45e7cd4e9d4 100644 --- a/src/rustc/back/upcall.rs +++ b/src/rustc/back/upcall.rs @@ -27,8 +27,7 @@ fn declare_upcalls(targ_cfg: @session::config, fn decl(llmod: ModuleRef, prefix: ~str, name: ~str, tys: ~[TypeRef], rv: TypeRef) -> ValueRef { - let mut arg_tys: ~[TypeRef] = ~[]; - for tys.each |t| { arg_tys.push(*t); } + let arg_tys = tys.map(|t| *t); let fn_ty = T_fn(arg_tys, rv); return base::decl_cdecl_fn(llmod, prefix + name, fn_ty); } |
