diff options
| author | Yuki Okushi <huyuumi.dev+love@gmail.com> | 2022-11-20 13:15:59 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-20 13:15:59 +0900 |
| commit | 785237d3924d4fb7b23803c964972dce82de2161 (patch) | |
| tree | c3b5a12cfff05df99d15ec98e86583d3a4045dee /compiler/rustc_codegen_gcc | |
| parent | e69b84204aecf27fe18ada467f78c83b788b80e4 (diff) | |
| parent | 71bb200225f0164940acc21f1fb647c8155f1706 (diff) | |
| download | rust-785237d3924d4fb7b23803c964972dce82de2161.tar.gz rust-785237d3924d4fb7b23803c964972dce82de2161.zip | |
Rollup merge of #104435 - scottmcm:iter-repeat-n, r=thomcc
`VecDeque::resize` should re-use the buffer in the passed-in element Today it always copies it for *every* appended element, but one of those clones is avoidable. This adds `iter::repeat_n` (https://github.com/rust-lang/rust/issues/104434) as the primitive needed to do this. If this PR is acceptable, I'll also use this in `Vec` rather than its custom `ExtendElement` type & infrastructure that is harder to share between multiple different containers: https://github.com/rust-lang/rust/blob/101e1822c3e54e63996c8aaa014d55716f3937eb/library/alloc/src/vec/mod.rs#L2479-L2492
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions
