quickcheck icon indicating copy to clipboard operation
quickcheck copied to clipboard

Make Arbitrary::arbitrary for SystemTime not panic

Open neithernut opened this issue 2 years ago • 0 comments

Arbitrary SystemTimes are generated based on arbitrary Durations by adding or subtracting from UNIX_EPOCH. If we happen to generate big Durations, this could cause an overflow.

This change avoids this problem by resorting to ever smaller durations in case of an overflow.

Fixes #321.

neithernut avatar Dec 12 '23 13:12 neithernut