Use 'dyn' on trait objects in quickcheck code.
diff --git a/src/quickcheck.rs b/src/quickcheck.rs
index bda1594..d4dd00f 100644
--- a/src/quickcheck.rs
+++ b/src/quickcheck.rs
@@ -71,7 +71,7 @@
// shrink the graph by splitting it in two by a very
// simple algorithm, just even and odd node indices
- fn shrink(&self) -> Box<Iterator<Item=Self>> {
+ fn shrink(&self) -> Box<dyn Iterator<Item=Self>> {
let self_ = self.clone();
Box::new((0..2).filter_map(move |x| {
let gr = self_.filter_map(|i, w| {
@@ -149,7 +149,7 @@
// shrink the graph by splitting it in two by a very
// simple algorithm, just even and odd node indices
- fn shrink(&self) -> Box<Iterator<Item=Self>> {
+ fn shrink(&self) -> Box<dyn Iterator<Item=Self>> {
let self_ = self.clone();
Box::new((0..2).filter_map(move |x| {
let gr = self_.filter_map(|i, w| {
diff --git a/tests/quickcheck.rs b/tests/quickcheck.rs
index c000c3c..2831a2d 100644
--- a/tests/quickcheck.rs
+++ b/tests/quickcheck.rs
@@ -565,7 +565,7 @@
// shrink the graph by splitting it in two by a very
// simple algorithm, just even and odd node indices
- fn shrink(&self) -> Box<Iterator<Item=Self>> {
+ fn shrink(&self) -> Box<dyn Iterator<Item=Self>> {
let self_ = self.clone();
Box::new((0..2).filter_map(move |x| {
let gr = self_.0.filter_map(|i, w| {
diff --git a/tests/utils/qc.rs b/tests/utils/qc.rs
index a03568e..2715ab1 100644
--- a/tests/utils/qc.rs
+++ b/tests/utils/qc.rs
@@ -19,7 +19,7 @@
Small(T::arbitrary(&mut StdGen::new(g, sz)))
}
- fn shrink(&self) -> Box<Iterator<Item=Self>> {
+ fn shrink(&self) -> Box<dyn Iterator<Item=Self>> {
Box::new((**self).shrink().map(Small))
}
}