Upgrade quickcheck to 1.0, adjust code, optimizing a slow test

This commit is contained in:
Joakim Frostegård 2021-02-04 19:34:44 +01:00
parent 72ff55ae5d
commit f9626ade57
19 changed files with 78 additions and 74 deletions

View file

@ -322,7 +322,7 @@ mod tests {
}
impl Arbitrary for AnnounceRequest {
fn arbitrary<G: Gen>(g: &mut G) -> Self {
fn arbitrary(g: &mut Gen) -> Self {
let key: Option<String> = Arbitrary::arbitrary(g);
AnnounceRequest {
@ -339,7 +339,7 @@ mod tests {
}
impl Arbitrary for ScrapeRequest {
fn arbitrary<G: Gen>(g: &mut G) -> Self {
fn arbitrary(g: &mut Gen) -> Self {
ScrapeRequest {
info_hashes: Arbitrary::arbitrary(g),
}
@ -347,7 +347,7 @@ mod tests {
}
impl Arbitrary for Request {
fn arbitrary<G: Gen>(g: &mut G) -> Self {
fn arbitrary(g: &mut Gen) -> Self {
if Arbitrary::arbitrary(g){
Self::Announce(Arbitrary::arbitrary(g))
} else {