From f4ba7515b36e4e6ddf154998d40e4d733092577a Mon Sep 17 00:00:00 2001 From: Bassem Girgis Date: Sat, 17 Jul 2021 13:52:46 -0500 Subject: [PATCH] 2nd --- src/main.rs | 2 ++ 1 file changed, 2 insertions(+) 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.