Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove rand as a public dependency + rollup and other cleanups #265

Merged
merged 8 commits into from
Dec 27, 2020

Commits on Dec 27, 2020

  1. api: remove Send bound from Arbitrary/Testable traits

    The Send bound is a relic from the past. Indeed, the docs for the
    Arbitrary trait have been outdated for quite some time. quickcheck
    stopped running each test in a separate thread once
    `std::panic::catch_unwind` was stabilized many moons ago. With
    `catch_unwind`, the `Send` bound is no longer necessary.
    
    We do need to retain the `'static` bound though. Without that,
    implementing shrink seems implausible.
    
    Fixes #262, Closes #263
    BurntSushi committed Dec 27, 2020
    Configuration menu
    Copy the full SHA
    c309676 View commit details
    Browse the repository at this point in the history
  2. macro: add license files

    Closes #258
    BurntSushi committed Dec 27, 2020
    Configuration menu
    Copy the full SHA
    a699f79 View commit details
    Browse the repository at this point in the history
  3. api: make arbitrary use full number range

    This commit tweaks the Arbitrary impls of number types (integers,
    floats) to use the full range with a small bias toward "problem" values.
    This is a change from prior behavior that would use the `size` parameter
    to control the range of integers.
    
    In retrospect, using the `size` parameter this way was probably
    misguided. Instead, it should only be used to control the sizes of data
    structures instead of also constraining numeric ranges. By constraining
    numeric ranges, we leave out a huge space of values that are never
    tested.
    
    Fixes #27, Fixes #119, Fixes #190, Fixes #233, Closes #240
    maxbla authored and BurntSushi committed Dec 27, 2020
    Configuration menu
    Copy the full SHA
    481c0c1 View commit details
    Browse the repository at this point in the history
  4. api: add Arbitrary impl for CString

    We add a little sophistication here for whether the CString is
    completely valid UTF-8 or whether it's just an arbitrary mix of bytes.
    (Excluding NUL of course.)
    
    Fixes #165, Closes #257
    ThomasdenH authored and BurntSushi committed Dec 27, 2020
    Configuration menu
    Copy the full SHA
    b2a6ba6 View commit details
    Browse the repository at this point in the history
  5. rand: remove rand as a public dependency

    This removes the use of the rand_core crate as a public dependency. It
    is now an implementation detail.
    
    We achieve this primarily by turning the `Gen` trait into a concrete
    type and fixing the fallout.
    
    This does make it impossible for callers to use their own `Gen`
    implementations, but it's unclear how often this was being used (if at
    all). This does also limit the number of RNG utility routines that
    callers have easy access to. However, it should be possible to use
    rand's `SeedableRng::from_{rng,seed}` routines to get access to more
    general RNGs.
    
    Closes #241
    BurntSushi committed Dec 27, 2020
    Configuration menu
    Copy the full SHA
    57ba0d1 View commit details
    Browse the repository at this point in the history
  6. deps: upgrade rand to 0.8

    This upgrades to the latest version of rand.
    
    Closes #264
    BurntSushi committed Dec 27, 2020
    Configuration menu
    Copy the full SHA
    db98d8d View commit details
    Browse the repository at this point in the history
  7. deps: update env_logger

    BurntSushi committed Dec 27, 2020
    Configuration menu
    Copy the full SHA
    3153426 View commit details
    Browse the repository at this point in the history
  8. msrv: bump to 1.46.0 and specify policy

    The next release will be a breaking change release anyway.
    
    We update a few other things as well. The examples in particular.
    BurntSushi committed Dec 27, 2020
    Configuration menu
    Copy the full SHA
    668c333 View commit details
    Browse the repository at this point in the history