diff --git a/src/main.rs b/src/main.rs index 73fa1c9..8f430fd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,8 @@ fn main() { // In general, the `{}` will be automatically replaced with any // arguments. These will be stringified. 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 // by providing a suffix. The number 31i64 for example has the type i64.