From c4230a2e3a6b021594e24f4a74d8149bf4894689 Mon Sep 17 00:00:00 2001 From: Stirling Hostetter Date: Wed, 2 Nov 2022 11:12:36 -0500 Subject: [PATCH] complete variables 1 & 2 --- exercises/variables/variables1.rs | 4 +--- exercises/variables/variables2.rs | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/exercises/variables/variables1.rs b/exercises/variables/variables1.rs index f4d182ac..84de9fdc 100644 --- a/exercises/variables/variables1.rs +++ b/exercises/variables/variables1.rs @@ -2,9 +2,7 @@ // Make me compile! // Execute `rustlings hint variables1` or use the `hint` watch subcommand for a hint. -// I AM NOT DONE - fn main() { - x = 5; + let x = 5; println!("x has the value {}", x); } diff --git a/exercises/variables/variables2.rs b/exercises/variables/variables2.rs index 641aeb8e..1002504f 100644 --- a/exercises/variables/variables2.rs +++ b/exercises/variables/variables2.rs @@ -1,10 +1,8 @@ // variables2.rs // Execute `rustlings hint variables2` or use the `hint` watch subcommand for a hint. -// I AM NOT DONE - fn main() { - let x; + let x: i32 = 10; if x == 10 { println!("x is ten!"); } else {