diff options
author | Mikail Bagishov <bagishov.mikail@yandex.ru> | 2020-05-21 20:42:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-21 19:42:28 +0200 |
commit | 1e54a35325fa371d61c428ead5879a6bb1b0ddf6 (patch) | |
tree | 447d100ec00371b09f3aa3da99f00e6a0d0fecb8 /tokio/src/io/async_read.rs | |
parent | 4f4f4807c3fe21cbfde82d894f044636b52cb04b (diff) |
io: remove zeroing for AsyncRead implementors (#2525)
Diffstat (limited to 'tokio/src/io/async_read.rs')
-rw-r--r-- | tokio/src/io/async_read.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tokio/src/io/async_read.rs b/tokio/src/io/async_read.rs index cc9091c9..a42c4ff2 100644 --- a/tokio/src/io/async_read.rs +++ b/tokio/src/io/async_read.rs @@ -76,7 +76,7 @@ pub trait AsyncRead { /// [`poll_read_buf`]: #method.poll_read_buf unsafe fn prepare_uninitialized_buffer(&self, buf: &mut [MaybeUninit<u8>]) -> bool { for x in buf { - *x.as_mut_ptr() = 0; + *x = MaybeUninit::new(0); } true |