diff --git a/gen/src/arbitrary_impls.rs b/gen/src/arbitrary_impls.rs index 359da68..ae544b1 100644 --- a/gen/src/arbitrary_impls.rs +++ b/gen/src/arbitrary_impls.rs @@ -69,13 +69,13 @@ impl Arbitrary for Hoc { g: &mut quickcheck::Gen, ) -> (Option, Option) { let inbound = Some(TransportMode::arbitrary(g)); - let outbound = Some(TransportMode::arbitrary(g)); + let mut outbound = Some(TransportMode::arbitrary(g)); - if inbound == outbound { - (inbound, Some(TransportMode::arbitrary(g))) - } else { - (inbound, outbound) + while inbound == outbound { + outbound = Some(TransportMode::arbitrary(g)); } + + (inbound, outbound) } let hub_type = HubType::arbitrary(g);