diff options
| author | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2014-01-09 21:06:55 +1100 |
|---|---|---|
| committer | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2014-01-11 10:46:00 +1100 |
| commit | 4fc0452acef1355ba566a30c5bd04ccd3b9acef2 (patch) | |
| tree | a11738f6d30837655498a8b7d2197bf01452a8f3 /src/libstd/rand | |
| parent | ff7ecca20e116b8365d8095fa9618dc11e54cfbe (diff) | |
| download | rust-4fc0452acef1355ba566a30c5bd04ccd3b9acef2.tar.gz rust-4fc0452acef1355ba566a30c5bd04ccd3b9acef2.zip | |
Remove re-exports of std::io::stdio::{print, println} in the prelude.
The `print!` and `println!` macros are now the preferred method of printing, and so there is no reason to export the `stdio` functions in the prelude. The functions have also been replaced by their macro counterparts in the tutorial and other documentation so that newcomers don't get confused about what they should be using.
Diffstat (limited to 'src/libstd/rand')
| -rw-r--r-- | src/libstd/rand/mod.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rand/reseeding.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/rand/mod.rs b/src/libstd/rand/mod.rs index e52a3850011..f9bd291fbf4 100644 --- a/src/libstd/rand/mod.rs +++ b/src/libstd/rand/mod.rs @@ -244,7 +244,7 @@ pub trait Rng { /// ```rust /// use std::rand::{task_rng, Rng}; /// - /// println(task_rng().gen_ascii_str(10)); + /// println!("{}", task_rng().gen_ascii_str(10)); /// ``` fn gen_ascii_str(&mut self, len: uint) -> ~str { static GEN_ASCII_STR_CHARSET: &'static [u8] = bytes!("ABCDEFGHIJKLMNOPQRSTUVWXYZ\ diff --git a/src/libstd/rand/reseeding.rs b/src/libstd/rand/reseeding.rs index c0a7d14bf70..758ca22e5c3 100644 --- a/src/libstd/rand/reseeding.rs +++ b/src/libstd/rand/reseeding.rs @@ -118,7 +118,7 @@ impl<S, R: SeedableRng<S>, Rsdr: Reseeder<R>> /// let mut rng = ReseedingRng::new(rand::StdRng::new(), 10, rsdr); /// /// // this will repeat, because it gets reseeded very regularly. -/// println(rng.gen_ascii_str(100)); +/// println!("{}", rng.gen_ascii_str(100)); /// } /// /// ``` |
