]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #4801 : z0w0/rust/randomtrait, r=graydon
authorbors <bors@rust-lang.org>
Thu, 7 Feb 2013 05:04:37 +0000 (21:04 -0800)
committerbors <bors@rust-lang.org>
Thu, 7 Feb 2013 05:04:37 +0000 (21:04 -0800)
Also adds Rng::gen() for generically generating any type that implements the Rand trait. There's no way to generate things with a length (for e.g. strings or vectors), because I can't think of an elegant way to do that. Maybe have a RandLen trait that inherits Rand?

This can be used for a quickcheck mechanism I'm working on.


Trivial merge