diff options
| author | Piotr Szotkowski <chastell@chastell.net> | 2014-10-25 22:50:38 +0200 |
|---|---|---|
| committer | Piotr Szotkowski <chastell@chastell.net> | 2014-10-25 22:50:38 +0200 |
| commit | 019a982f5164efdc8b89f6afccdc83fea10a07ca (patch) | |
| tree | 335db7ab98c3c9facd7e2c7e19954a9a084fb6b0 /src | |
| parent | a34b8dec697014f15e725215e17ea8d956c0ab1a (diff) | |
| download | rust-019a982f5164efdc8b89f6afccdc83fea10a07ca.tar.gz rust-019a982f5164efdc8b89f6afccdc83fea10a07ca.zip | |
Guide: drop :d formatting where unnecessary
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/guide.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/doc/guide.md b/src/doc/guide.md index 6ef76219fa9..bf52783ddd9 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!"), } } @@ -4217,7 +4217,7 @@ Remember Rust's `for` loop? Here's an example: ```{rust} for x in range(0i, 10i) { - println!("{:d}", x); + println!("{}", x); } ``` |
