mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 02:05:30 +00:00
Upgrade quickcheck to 1.0, adjust code, optimizing a slow test
This commit is contained in:
parent
72ff55ae5d
commit
f9626ade57
19 changed files with 78 additions and 74 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue