Skip to content

Commit

Permalink
Fixup wrapper implementations to mach updated trait
Browse files Browse the repository at this point in the history
Signed-off-by: lloydmeta <lloydmeta@gmail.com>
  • Loading branch information
lloydmeta committed Feb 11, 2024
1 parent 49939c6 commit 15b2812
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions laws/src/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,31 @@ use quickcheck::*;
pub struct Wrapper<A>(A);

impl<A: Arbitrary + Ord + Clone> Arbitrary for Wrapper<Max<A>> {
fn arbitrary<G: Gen>(g: &mut G) -> Self {
fn arbitrary(g: &mut Gen) -> Self {
Wrapper(Max(Arbitrary::arbitrary(g)))
}
}

impl<A: Arbitrary + Ord + Clone> Arbitrary for Wrapper<Min<A>> {
fn arbitrary<G: Gen>(g: &mut G) -> Self {
fn arbitrary(g: &mut Gen) -> Self {
Wrapper(Min(Arbitrary::arbitrary(g)))
}
}

impl<A: Arbitrary> Arbitrary for Wrapper<All<A>> {
fn arbitrary<G: Gen>(g: &mut G) -> Self {
fn arbitrary(g: &mut Gen) -> Self {
Wrapper(All(Arbitrary::arbitrary(g)))
}
}

impl<A: Arbitrary> Arbitrary for Wrapper<Any<A>> {
fn arbitrary<G: Gen>(g: &mut G) -> Self {
fn arbitrary(g: &mut Gen) -> Self {
Wrapper(Any(Arbitrary::arbitrary(g)))
}
}

impl<A: Arbitrary> Arbitrary for Wrapper<Product<A>> {
fn arbitrary<G: Gen>(g: &mut G) -> Self {
fn arbitrary(g: &mut Gen) -> Self {
Wrapper(Product(Arbitrary::arbitrary(g)))
}
}
Expand Down

0 comments on commit 15b2812

Please sign in to comment.