Fixed version of print

This commit is contained in:
Dan Buch 2020-06-08 11:24:43 -04:00
parent 459bfb7caa
commit bef89a0bee
Signed by: meatballhat
GPG Key ID: 9685130D8B763EA7
2 changed files with 7 additions and 2 deletions

View File

@ -1 +1,2 @@
/hello/hello
/hello/print

View File

@ -14,10 +14,14 @@ fn main() {
println!("{number:>0width$}", number=1, width=6);
println!("My name is {0}, {1} {0}", "Bond");
println!("My name is {0}, {1} {0}", "Bond", "James");
#[allow(dead_code)]
#[derive(Debug)]
struct Structure(i32);
println!("This struct `{}` won't print...", Structure(3));
println!("This struct `{:?}` will print...", Structure(3));
let pi = 3.141592;
println!("Pi is roughly {:.3}", pi);
}