Skip to content

Commit

Permalink
Allow bare_trait_objects for now
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Sep 3, 2019
1 parent 50f6197 commit f13f1e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/bigint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ impl Arbitrary for BigInt {
Self::from_biguint(sign, BigUint::arbitrary(g))
}

#[allow(bare_trait_objects)] // `dyn` needs Rust 1.27 to parse, even when cfg-disabled
fn shrink(&self) -> Box<Iterator<Item = Self>> {
let sign = self.sign();
let unsigned_shrink = self.data.shrink();
Expand Down
1 change: 1 addition & 0 deletions src/biguint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ impl Arbitrary for BigUint {
Self::new(Vec::<u32>::arbitrary(g))
}

#[allow(bare_trait_objects)] // `dyn` needs Rust 1.27 to parse, even when cfg-disabled
fn shrink(&self) -> Box<Iterator<Item = Self>> {
// Use shrinker from Vec
Box::new(self.data.shrink().map(|x| BigUint::new(x)))
Expand Down

0 comments on commit f13f1e9

Please sign in to comment.