Skip to content

Commit f6a2327

Browse files
committed
fix: differing inbount/outbound modalities for Hocs
1 parent c693ca6 commit f6a2327

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

gen/src/arbitrary_impls.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ impl Arbitrary for Hoc {
6969
g: &mut quickcheck::Gen,
7070
) -> (Option<TransportMode>, Option<TransportMode>) {
7171
let inbound = Some(TransportMode::arbitrary(g));
72-
let outbound = Some(TransportMode::arbitrary(g));
72+
let mut outbound = Some(TransportMode::arbitrary(g));
7373

74-
if inbound == outbound {
75-
(inbound, Some(TransportMode::arbitrary(g)))
76-
} else {
77-
(inbound, outbound)
74+
while inbound == outbound {
75+
outbound = Some(TransportMode::arbitrary(g));
7876
}
77+
78+
(inbound, outbound)
7979
}
8080

8181
let hub_type = HubType::arbitrary(g);

0 commit comments

Comments
 (0)