about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/coverage/debug.rs
diff options
context:
space:
mode:
authorMara <m-ou.se@m-ou.se>2021-03-05 10:57:20 +0100
committerGitHub <noreply@github.com>2021-03-05 10:57:20 +0100
commit68f2934a154abac9a2af72c55e4c08277172e087 (patch)
tree6fdc69254f2cf9b45b014cd0c02b72060b064e7f /compiler/rustc_mir/src/transform/coverage/debug.rs
parentee796c65233e24f76c6867bb393416608364500f (diff)
parent9425e304b13e5cfc6f5d36f0a872fc8313da40aa (diff)
downloadrust-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/debug.rs')
0 files changed, 0 insertions, 0 deletions