Skip to content

Instantly share code, notes, and snippets.

@willie-hung
Created August 1, 2023 17:28
Show Gist options
  • Save willie-hung/dd377ad72d835a44dcbc892073db9856 to your computer and use it in GitHub Desktop.
Save willie-hung/dd377ad72d835a44dcbc892073db9856 to your computer and use it in GitHub Desktop.
post_31
fn main() {
let i = {
// This is a statement
let j = 69;
// This is an expression
j + 1
};
println!("Hello, world! {}", i);
}
// Output:
// Hello, world! 70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment