Skip to content

Commit 019a982

Browse files
committed
Guide: drop :d formatting where unnecessary
1 parent a34b8de commit 019a982

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
}
@@ -4217,7 +4217,7 @@ Remember Rust's `for` loop? Here's an example:
42174217

42184218
```{rust}
42194219
for x in range(0i, 10i) {
4220-
println!("{:d}", x);
4220+
println!("{}", x);
42214221
}
42224222
```
42234223

0 commit comments

Comments
 (0)