]> git.lizzy.rs Git - rust.git/commit
rand: deprecate `rng`.
authorHuon Wilson <dbau.pp+github@gmail.com>
Sun, 2 Mar 2014 01:59:35 +0000 (12:59 +1100)
committerHuon Wilson <dbau.pp+github@gmail.com>
Wed, 12 Mar 2014 00:31:43 +0000 (11:31 +1100)
commit689f19722fabd9aab61e826e00140a7fe7084afa
treef1b124415b95601fb001fe922b4e98b62f893c78
parent198caa87cd870f8fd52bf0bd5fe471cf439c12f0
rand: deprecate `rng`.

This should be called far less than it is because it does expensive OS
interactions and seeding of the internal RNG, `task_rng` amortises this
cost. The main problem is the name is so short and suggestive.

The direct equivalent is `StdRng::new`, which does precisely the same
thing.

The deprecation will make migrating away from the function easier.
src/libextra/tempfile.rs
src/libflate/lib.rs
src/librand/lib.rs
src/libstd/os.rs
src/libsyntax/parse/token.rs
src/libuuid/lib.rs
src/test/bench/core-std.rs
src/test/run-pass/morestack6.rs