about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-10-27 09:07:38 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-10-27 15:12:29 -0700
commit54647bd317d548da36c020b7912ba5fd5c7b5793 (patch)
tree1e5d30d1970aac9ba01271f782f93cbc776ec980
parent9dc9eccf3d681ce898bfb407bb5430c6d4de5982 (diff)
parent019a982f5164efdc8b89f6afccdc83fea10a07ca (diff)
downloadrust-54647bd317d548da36c020b7912ba5fd5c7b5793.tar.gz
rust-54647bd317d548da36c020b7912ba5fd5c7b5793.zip
rollup merge of #18320 : chastell/guide_simplify_formatting
-rw-r--r--src/doc/guide.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/doc/guide.md b/src/doc/guide.md
index a13feda44af..a399fde579c 100644
--- a/src/doc/guide.md
+++ b/src/doc/guide.md
@@ -1130,12 +1130,12 @@ fn main() {
     let y = Missing;
 
     match x {
-        Value(n) => println!("x is {:d}", n),
+        Value(n) => println!("x is {}", n),
         Missing  => println!("x is missing!"),
     }
 
     match y {
-        Value(n) => println!("y is {:d}", n),
+        Value(n) => println!("y is {}", n),
         Missing  => println!("y is missing!"),
     }
 }
@@ -1301,7 +1301,7 @@ Instead, it looks like this:
 
 ```{rust}
 for x in range(0i, 10i) {
-    println!("{:d}", x);
+    println!("{}", x);
 }
 ```
 
@@ -1408,7 +1408,7 @@ iteration: This will only print the odd numbers:
 for x in range(0i, 10i) {
     if x % 2 == 0 { continue; }
 
-    println!("{:d}", x);
+    println!("{}", x);
 }
 ```
 
@@ -1677,12 +1677,12 @@ fn main() {
     let y = Missing;
 
     match x {
-        Value(n) => println!("x is {:d}", n),
+        Value(n) => println!("x is {}", n),
         Missing  => println!("x is missing!"),
     }
 
     match y {
-        Value(n) => println!("y is {:d}", n),
+        Value(n) => println!("y is {}", n),
         Missing  => println!("y is missing!"),
     }
 }
@@ -4254,7 +4254,7 @@ Remember Rust's `for` loop? Here's an example:
 
 ```{rust}
 for x in range(0i, 10i) {
-    println!("{:d}", x);
+    println!("{}", x);
 }
 ```