Giter Site home page Giter Site logo

Comments (5)

apasel422 avatar apasel422 commented on August 11, 2024

The other solution is to add this to your crate:

extern crate rand;
use rand::Rng;

from quickcheck.

BurntSushi avatar BurntSushi commented on August 11, 2024

What is the right thing to do here? Are there any downsides to re-exporting it? That certainly seems like the more convenient option (and one I hadn't thought of!).

from quickcheck.

twittner avatar twittner commented on August 11, 2024

The other solution is to add this to your crate: [...]

Yes. In addition it requires adding rand explicitly as a dependency in your Cargo.toml file.

from quickcheck.

Wilfred avatar Wilfred commented on August 11, 2024

Related: rust-lang/rust#22050

from quickcheck.

BurntSushi avatar BurntSushi commented on August 11, 2024

OK, I fixed this by re-exporting the rand::Rng type. I'm not sure if it's the right solution, but it seems better than requiring an explicit dependency on rand just to use methods defined by the Gen trait.

from quickcheck.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.