File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,9 @@ fn main() {
44
44
println!("{number:>5}", number=1);
45
45
46
46
// You can pad numbers with extra zeroes,
47
+ println!("{number:0>5}", number=1); // 00001
47
48
// and left-adjust by flipping the sign. This will output "10000".
48
- println!("{number:0<5}", number=1);
49
+ println!("{number:0<5}", number=1); // 10000
49
50
50
51
// You can use named arguments in the format specifier by appending a `$`.
51
52
println!("{number:0>width$}", number=1, width=5);
@@ -62,7 +63,7 @@ fn main() {
62
63
63
64
// This will not compile because `Structure` does not implement
64
65
// fmt::Display.
65
- //println!("This struct `{}` won't print...", Structure(3));
66
+ // println!("This struct `{}` won't print...", Structure(3));
66
67
// TODO ^ Try uncommenting this line
67
68
68
69
// For Rust 1.58 and above, you can directly capture the argument from a
You can’t perform that action at this time.
0 commit comments