From 9af48b08c709d217eeda2c9bcd59e310f9928dd3 Mon Sep 17 00:00:00 2001 From: Kornel Date: Mon, 9 Mar 2020 18:06:57 +0000 Subject: [PATCH] Fix fuzz compilation error (#454) --- tests/h2-fuzz/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/h2-fuzz/src/main.rs b/tests/h2-fuzz/src/main.rs index 0bfc1d1..a57fb76 100644 --- a/tests/h2-fuzz/src/main.rs +++ b/tests/h2-fuzz/src/main.rs @@ -28,7 +28,7 @@ impl<'a> MockIo<'a> { } impl<'a> AsyncRead for MockIo<'a> { - unsafe fn prepare_uninitialized_buffer(&self, _buf: &mut [u8]) -> bool { + unsafe fn prepare_uninitialized_buffer(&self, _buf: &mut [std::mem::MaybeUninit]) -> bool { false } @@ -123,7 +123,7 @@ async fn run(script: &[u8]) -> Result<(), h2::Error> { fn main() { env_logger::init(); - let rt = tokio::runtime::Runtime::new().unwrap(); + let mut rt = tokio::runtime::Runtime::new().unwrap(); loop { honggfuzz::fuzz!(|data: &[u8]| { eprintln!("{:?}", rt.block_on(run(data)));