Skip to content

Commit

Permalink
Slightly simplify the Arbitrary instance for PeerAddr
Browse files Browse the repository at this point in the history
More direct and no discards in the generator.
  • Loading branch information
dcoutts authored and coot committed May 12, 2021
1 parent 24918f9 commit ce6b910
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -34,7 +34,7 @@ newtype PeerAddr = PeerAddr Int
-- here for the few cases that need it, and it is used for (lack-of) shrinking.
--
instance Arbitrary PeerAddr where
arbitrary = PeerAddr . getNonNegative <$> arbitrary
arbitrary = PeerAddr <$> arbitrarySizedNatural
shrink _ = []


Expand Down

0 comments on commit ce6b910

Please sign in to comment.