Skip to content

Commit 54647bd

Browse files
committed
rollup merge of #18320 : chastell/guide_simplify_formatting
2 parents 9dc9ecc + 019a982 commit 54647bd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/doc/guide.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,12 +1130,12 @@ fn main() {
11301130
let y = Missing;
11311131
11321132
match x {
1133-
Value(n) => println!("x is {:d}", n),
1133+
Value(n) => println!("x is {}", n),
11341134
Missing => println!("x is missing!"),
11351135
}
11361136
11371137
match y {
1138-
Value(n) => println!("y is {:d}", n),
1138+
Value(n) => println!("y is {}", n),
11391139
Missing => println!("y is missing!"),
11401140
}
11411141
}
@@ -1301,7 +1301,7 @@ Instead, it looks like this:
13011301

13021302
```{rust}
13031303
for x in range(0i, 10i) {
1304-
println!("{:d}", x);
1304+
println!("{}", x);
13051305
}
13061306
```
13071307

@@ -1408,7 +1408,7 @@ iteration: This will only print the odd numbers:
14081408
for x in range(0i, 10i) {
14091409
if x % 2 == 0 { continue; }
14101410
1411-
println!("{:d}", x);
1411+
println!("{}", x);
14121412
}
14131413
```
14141414

@@ -1677,12 +1677,12 @@ fn main() {
16771677
let y = Missing;
16781678
16791679
match x {
1680-
Value(n) => println!("x is {:d}", n),
1680+
Value(n) => println!("x is {}", n),
16811681
Missing => println!("x is missing!"),
16821682
}
16831683
16841684
match y {
1685-
Value(n) => println!("y is {:d}", n),
1685+
Value(n) => println!("y is {}", n),
16861686
Missing => println!("y is missing!"),
16871687
}
16881688
}
@@ -4254,7 +4254,7 @@ Remember Rust's `for` loop? Here's an example:
42544254

42554255
```{rust}
42564256
for x in range(0i, 10i) {
4257-
println!("{:d}", x);
4257+
println!("{}", x);
42584258
}
42594259
```
42604260

0 commit comments

Comments
 (0)