diff options
author | htrefil <8711792+htrefil@users.noreply.github.com> | 2020-07-01 23:57:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-01 14:57:25 -0700 |
commit | be02d36a86b2d5fb05c813d332a09e0c44398cfe (patch) | |
tree | 489eed02b8d047805988752740b7b670f619ffe3 /tokio/src/io/util | |
parent | cf2c05317c348c67a7dbbd9a2d334c39a333980f (diff) |
io: allocate buffer directly on heap (#2634)
Diffstat (limited to 'tokio/src/io/util')
-rw-r--r-- | tokio/src/io/util/copy.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tokio/src/io/util/copy.rs b/tokio/src/io/util/copy.rs index 8e0058c1..7bfe2969 100644 --- a/tokio/src/io/util/copy.rs +++ b/tokio/src/io/util/copy.rs @@ -70,7 +70,7 @@ cfg_io_util! { amt: 0, pos: 0, cap: 0, - buf: Box::new([0; 2048]), + buf: vec![0; 2048].into_boxed_slice(), } } } |