This commit is contained in:
2021-07-17 13:52:46 -05:00
parent e6eab1377f
commit f4ba7515b3

View File

@@ -2,6 +2,8 @@ fn main() {
// In general, the `{}` will be automatically replaced with any // In general, the `{}` will be automatically replaced with any
// arguments. These will be stringified. // arguments. These will be stringified.
println!("{} days", 31); println!("{} days", 31);
let s = format!("formatted {} days", 31);
println!("{}", s);
// Without a suffix, 31 becomes an i32. You can change what type 31 is // Without a suffix, 31 becomes an i32. You can change what type 31 is
// by providing a suffix. The number 31i64 for example has the type i64. // by providing a suffix. The number 31i64 for example has the type i64.