diff options
| author | Taras Tsugrii <taras.tsugriy@gmail.com> | 2023-08-15 18:33:57 -0700 |
|---|---|---|
| committer | Taras Tsugrii <taras.tsugriy@gmail.com> | 2023-08-16 10:05:14 -0700 |
| commit | ac0a8ca40d163c6f7a2724ac0c785cf0bf2e9ef4 (patch) | |
| tree | cbe0dc94903e37c5536a70ed9c0bef09aa29b8be /compiler/rustc_codegen_llvm/src/context.rs | |
| parent | 5b9168a32d143067ffe99fb1c6979b8daa6d715e (diff) | |
| download | rust-ac0a8ca40d163c6f7a2724ac0c785cf0bf2e9ef4.tar.gz rust-ac0a8ca40d163c6f7a2724ac0c785cf0bf2e9ef4.zip | |
Avoid unnecessary Vec resize.
If `size > 0` current implementation will first create an empty vec and then push an element into it, which will cause a resize that can be easily avoided. It's obviously not a big deal, but this also gets rid of `mut` local variable.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
0 files changed, 0 insertions, 0 deletions
