Skip to content

Commit 7bc4e40

Browse files
Merge pull request #108 from sine-fdn/martin/inbound-outbound-fix
fix: differing inbount/outbound modalities for Hocs
2 parents c693ca6 + f6a2327 commit 7bc4e40

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)