BurntSushi / quickcheck

Automated property based testing for Rust (with shrinking).
The Unlicense
2.4k stars 149 forks source link

Use std::iter::empty inside empty_shrinker #106

Closed bluss closed 8 years ago

bluss commented 8 years ago

The empty iterator is a zero sized type, and this way the empty shrinker (also the default shrinker) uses no allocation at all.

empty and once require Rust 1.2 or later.

BurntSushi commented 8 years ago

QuickCheck pays no mind to allocation, but this still seems good to do anyway. Thanks!

bluss commented 8 years ago

:smile: I guess, it came out of habit.