diff options
| author | Mara <m-ou.se@m-ou.se> | 2021-03-05 10:57:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-05 10:57:20 +0100 |
| commit | 68f2934a154abac9a2af72c55e4c08277172e087 (patch) | |
| tree | 6fdc69254f2cf9b45b014cd0c02b72060b064e7f /compiler/rustc_mir/src/transform/coverage/graph.rs | |
| parent | ee796c65233e24f76c6867bb393416608364500f (diff) | |
| parent | 9425e304b13e5cfc6f5d36f0a872fc8313da40aa (diff) | |
| download | rust-68f2934a154abac9a2af72c55e4c08277172e087.tar.gz rust-68f2934a154abac9a2af72c55e4c08277172e087.zip | |
Rollup merge of #82728 - calebsander:refactor/bufreader-buf, r=m-ou-se
Avoid unnecessary Vec construction in BufReader As mentioned in #80460, creating a `Vec` and calling `Vec::into_boxed_slice()` emits unnecessary calls to `realloc()` and `free()`. Updated the code to use `Box::new_uninit_slice()` to create a boxed slice directly. I think this also makes it more explicit that the initial contents of the buffer are uninitialized. r? ``@m-ou-se``
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/graph.rs')
0 files changed, 0 insertions, 0 deletions
