about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorBirunthan Mohanathas <birunthan@mohanathas.com>2013-07-22 19:03:39 +0300
committerDaniel Micay <danielmicay@gmail.com>2013-07-24 09:45:20 -0400
commitd047cf1ec612f766365bde0c9d146b58ef3cc7c7 (patch)
tree1e78f76ac07c358321b3d32d2d943a47a8c1dc32 /src/libstd
parentaf5a17b7d0788438bb6b39cccfc96a0b13e00250 (diff)
downloadrust-d047cf1ec612f766365bde0c9d146b58ef3cc7c7.tar.gz
rust-d047cf1ec612f766365bde0c9d146b58ef3cc7c7.zip
Change 'print(fmt!(...))' to printf!/printfln! in src/lib*
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/iterator.rs2
-rw-r--r--src/libstd/num/uint_macros.rs2
-rw-r--r--src/libstd/rand.rs22
-rw-r--r--src/libstd/rand/distributions.rs4
-rw-r--r--src/libstd/str.rs2
-rw-r--r--src/libstd/vec.rs4
6 files changed, 18 insertions, 18 deletions
diff --git a/src/libstd/iterator.rs b/src/libstd/iterator.rs
index 2c971f0c9ce..0c2a7bb7b40 100644
--- a/src/libstd/iterator.rs
+++ b/src/libstd/iterator.rs
@@ -326,7 +326,7 @@ pub trait IteratorUtil<A> {
     /// use std::iterator::Counter;
     ///
     /// for Counter::new(0, 10).advance |i| {
-    ///     io::println(fmt!("%d", i));
+    ///     printfln!("%d", i);
     /// }
     /// ~~~
     fn advance(&mut self, f: &fn(A) -> bool) -> bool;
diff --git a/src/libstd/num/uint_macros.rs b/src/libstd/num/uint_macros.rs
index 54c1327fa93..acf7ea683fb 100644
--- a/src/libstd/num/uint_macros.rs
+++ b/src/libstd/num/uint_macros.rs
@@ -103,7 +103,7 @@ fn range_step_core(start: $T, stop: $T, step: $T_SIGNED, r: Range, it: &fn($T) -
 /// let nums = [1,2,3,4,5,6,7];
 ///
 /// for uint::range_step(0, nums.len() - 1, 2) |i| {
-///     println(fmt!("%d & %d", nums[i], nums[i+1]));
+///     printfln!("%d & %d", nums[i], nums[i+1]);
 /// }
 /// ~~~
 ///
diff --git a/src/libstd/rand.rs b/src/libstd/rand.rs
index 06c743edd2b..6d0613b2e67 100644
--- a/src/libstd/rand.rs
+++ b/src/libstd/rand.rs
@@ -28,7 +28,7 @@ use std::rand::RngUtil;
 fn main() {
     let mut rng = rand::rng();
     if rng.gen() { // bool
-        println(fmt!("int: %d, uint: %u", rng.gen(), rng.gen()))
+        printfln!("int: %d, uint: %u", rng.gen(), rng.gen())
     }
 }
 ~~~
@@ -38,7 +38,7 @@ use std::rand;
 
 fn main () {
     let tuple_ptr = rand::random::<~(f64, char)>();
-    println(fmt!("%?", tuple_ptr))
+    printfln!(tuple_ptr)
 }
 ~~~
 */
@@ -301,7 +301,7 @@ pub trait RngUtil {
      *
      * fn main() {
      *     let mut rng = rand::rng();
-     *     println(fmt!("%b",rng.gen_weighted_bool(3)));
+     *     printfln!("%b", rng.gen_weighted_bool(3));
      * }
      * ~~~
      */
@@ -335,7 +335,7 @@ pub trait RngUtil {
      *
      * fn main() {
      *     let mut rng = rand::rng();
-     *     println(fmt!("%?",rng.gen_bytes(8)));
+     *     printfln!(rng.gen_bytes(8));
      * }
      * ~~~
      */
@@ -352,7 +352,7 @@ pub trait RngUtil {
      *
      * fn main() {
      *     let mut rng = rand::rng();
-     *     println(fmt!("%d",rng.choose([1,2,4,8,16,32])));
+     *     printfln!("%d", rng.choose([1,2,4,8,16,32]));
      * }
      * ~~~
      */
@@ -375,7 +375,7 @@ pub trait RngUtil {
      *     let x = [rand::Weighted {weight: 4, item: 'a'},
      *              rand::Weighted {weight: 2, item: 'b'},
      *              rand::Weighted {weight: 2, item: 'c'}];
-     *     println(fmt!("%c",rng.choose_weighted(x)));
+     *     printfln!("%c", rng.choose_weighted(x));
      * }
      * ~~~
      */
@@ -396,7 +396,7 @@ pub trait RngUtil {
      *     let x = [rand::Weighted {weight: 4, item: 'a'},
      *              rand::Weighted {weight: 2, item: 'b'},
      *              rand::Weighted {weight: 2, item: 'c'}];
-     *     println(fmt!("%?",rng.choose_weighted_option(x)));
+     *     printfln!(rng.choose_weighted_option(x));
      * }
      * ~~~
      */
@@ -418,7 +418,7 @@ pub trait RngUtil {
      *     let x = [rand::Weighted {weight: 4, item: 'a'},
      *              rand::Weighted {weight: 2, item: 'b'},
      *              rand::Weighted {weight: 2, item: 'c'}];
-     *     println(fmt!("%?",rng.weighted_vec(x)));
+     *     printfln!(rng.weighted_vec(x));
      * }
      * ~~~
      */
@@ -435,7 +435,7 @@ pub trait RngUtil {
      *
      * fn main() {
      *     let mut rng = rand::rng();
-     *     println(fmt!("%?",rng.shuffle([1,2,3])));
+     *     printfln!(rng.shuffle([1,2,3]));
      * }
      * ~~~
      */
@@ -454,9 +454,9 @@ pub trait RngUtil {
      *     let mut rng = rand::rng();
      *     let mut y = [1,2,3];
      *     rng.shuffle_mut(y);
-     *     println(fmt!("%?",y));
+     *     printfln!(y);
      *     rng.shuffle_mut(y);
-     *     println(fmt!("%?",y));
+     *     printfln!(y);
      * }
      * ~~~
      */
diff --git a/src/libstd/rand/distributions.rs b/src/libstd/rand/distributions.rs
index 4d983b94954..56eae042875 100644
--- a/src/libstd/rand/distributions.rs
+++ b/src/libstd/rand/distributions.rs
@@ -70,7 +70,7 @@ fn ziggurat<R:Rng>(rng: &mut R,
 ///
 /// fn main() {
 ///     let normal = 2.0 + (*rand::random::<StandardNormal>()) * 3.0;
-///     println(fmt!("%f is from a N(2, 9) distribution", normal))
+///     printfln!("%f is from a N(2, 9) distribution", normal)
 /// }
 /// ~~~
 pub struct StandardNormal(f64);
@@ -124,7 +124,7 @@ impl Rand for StandardNormal {
 ///
 /// fn main() {
 ///     let exp2 = (*rand::random::<Exp1>()) * 0.5;
-///     println(fmt!("%f is from a Exp(2) distribution", exp2));
+///     printfln!("%f is from a Exp(2) distribution", exp2);
 /// }
 /// ~~~
 pub struct Exp1(f64);
diff --git a/src/libstd/str.rs b/src/libstd/str.rs
index c49a0050266..5b83112fe6b 100644
--- a/src/libstd/str.rs
+++ b/src/libstd/str.rs
@@ -1727,7 +1727,7 @@ impl<'self> StrSlice<'self> for &'self str {
      * let i = 0u;
      * while i < s.len() {
      *     let CharRange {ch, next} = s.char_range_at(i);
-     *     std::io::println(fmt!("%u: %c",i,ch));
+     *     printfln!("%u: %c", i, ch);
      *     i = next;
      * }
      * ~~~
diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs
index 9c66ee5eae4..8432f28a969 100644
--- a/src/libstd/vec.rs
+++ b/src/libstd/vec.rs
@@ -833,7 +833,7 @@ impl<'self,T> ImmutableVector<'self, T> for &'self [T] {
      * ~~~ {.rust}
      * let v = &[1,2,3,4];
      * for v.window_iter().advance |win| {
-     *     io::println(fmt!("%?", win));
+     *     printfln!(win);
      * }
      * ~~~
      *
@@ -862,7 +862,7 @@ impl<'self,T> ImmutableVector<'self, T> for &'self [T] {
      * ~~~ {.rust}
      * let v = &[1,2,3,4,5];
      * for v.chunk_iter().advance |win| {
-     *     io::println(fmt!("%?", win));
+     *     printfln!(win);
      * }
      * ~~~
      *