Skip to content

Commit

Permalink
Update paste dependency to 1.0, arbitrary to 0.4, console to 0.12 and…
Browse files Browse the repository at this point in the history
… semver to 0.10 (xiph#2489)
  • Loading branch information
sdroege authored Aug 10, 2020
1 parent 15a4364 commit a811e9e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
14 changes: 5 additions & 9 deletions src/fuzzing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

use std::sync::Arc;

use arbitrary::*;
use arbitrary::{Arbitrary, Unstructured};

use crate::prelude::*;

Expand Down Expand Up @@ -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<Self, BufferError> {
Ok(Self { buffer: RingBuffer::new(data, data.len())? })
fn new(data: &'a [u8]) -> Self {
Self { buffer: Unstructured::new(data) }
}

fn g<T: Arbitrary>(&mut self) -> T {
Expand All @@ -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)
}};
}

Expand Down
4 changes: 2 additions & 2 deletions src/test_encode_decode/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit a811e9e

Please sign in to comment.