diff --git a/Cargo.toml b/Cargo.toml index a3a314bb18..cf4b1706ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,7 +63,7 @@ y4m = { version = "0.6", optional = true } backtrace = { version = "0.3", optional = true } num-traits = "0.2" num-derive = "0.3" -paste = "0.1" +paste = "1.0" noop_proc_macro = "0.3.0" serde = { version = "1.0", features = ["derive"], optional = true } dav1d-sys = { version = "0.3.2", optional = true } @@ -78,7 +78,7 @@ arrayvec = { version = "0.5", features = ["array-sizes-33-128"] } thiserror = "1.0" byteorder = { version = "1.3.2", optional = true } log = "0.4" -console = { version = "0.11", optional = true } +console = { version = "0.12", optional = true } fern = { version = "0.6", optional = true } itertools = "0.9" simd_helpers = "0.1" @@ -118,10 +118,10 @@ pretty_assertions = "0.6" interpolate_name = "0.2.2" rand = "0.7" rand_chacha = "0.2" -semver = "0.9" +semver = "0.10" [target.'cfg(fuzzing)'.dependencies] -arbitrary = "0.2" +arbitrary = "0.4" interpolate_name = "0.2.2" rand = "0.7" rand_chacha = "0.2" diff --git a/src/fuzzing.rs b/src/fuzzing.rs index 911187b443..132254c71b 100644 --- a/src/fuzzing.rs +++ b/src/fuzzing.rs @@ -9,7 +9,7 @@ use std::sync::Arc; -use arbitrary::*; +use arbitrary::{Arbitrary, Unstructured}; use crate::prelude::*; @@ -41,12 +41,12 @@ use crate::prelude::*; // A helper for generating arbitrary data. struct Generator<'a> { - buffer: RingBuffer<'a>, + buffer: Unstructured<'a>, } impl<'a> Generator<'a> { - fn new(data: &'a [u8]) -> Result { - Ok(Self { buffer: RingBuffer::new(data, data.len())? }) + fn new(data: &'a [u8]) -> Self { + Self { buffer: Unstructured::new(data) } } fn g(&mut self) -> T { @@ -56,11 +56,7 @@ impl<'a> Generator<'a> { macro_rules! create_generator { ($data:expr) => {{ - let g = Generator::new($data); - if g.is_err() { - return; - } - g.unwrap() + Generator::new($data) }}; } diff --git a/src/test_encode_decode/mod.rs b/src/test_encode_decode/mod.rs index 884a11da5b..ceba810979 100644 --- a/src/test_encode_decode/mod.rs +++ b/src/test_encode_decode/mod.rs @@ -678,7 +678,7 @@ fn high_bit_depth(decoder: &str, depth: usize) { macro_rules! test_high_bit_depth { ($($B:expr),+) => { $( - paste::item_with_macros!{ + paste::item!{ #[cfg_attr(feature = "decode_test", interpolate_test(aom, "aom"))] #[cfg_attr(feature = "decode_test_dav1d", interpolate_test(dav1d, "dav1d"))] #[ignore] @@ -709,7 +709,7 @@ fn chroma_sampling(decoder: &str, cs: ChromaSampling) { macro_rules! test_chroma_sampling { ($(($S:expr, $I:expr)),+) => { $( - paste::item_with_macros!{ + paste::item!{ #[cfg_attr(feature = "decode_test", interpolate_test(aom, "aom"))] #[cfg_attr(feature = "decode_test_dav1d", interpolate_test(dav1d, "dav1d"))] #[ignore]