summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2023-02-24 13:42:59 -0700
committermo khan <mo@mokhan.ca>2023-02-24 13:42:59 -0700
commit0a4a3bd031425f9d0c64130abb3e17cda8a8169a (patch)
treef6ddac7dbece158bcd844f7c5f09e6fe599f3283
parent111fadc673e559accfc08037922f4378fe35f04d (diff)
add 3.1
-rw-r--r--3.1/variables/Cargo.lock7
-rw-r--r--3.1/variables/Cargo.toml8
-rw-r--r--3.1/variables/src/main.rs6
3 files changed, 21 insertions, 0 deletions
diff --git a/3.1/variables/Cargo.lock b/3.1/variables/Cargo.lock
new file mode 100644
index 0000000..a6daf1d
--- /dev/null
+++ b/3.1/variables/Cargo.lock
@@ -0,0 +1,7 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "variables"
+version = "0.1.0"
diff --git a/3.1/variables/Cargo.toml b/3.1/variables/Cargo.toml
new file mode 100644
index 0000000..f1cad76
--- /dev/null
+++ b/3.1/variables/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "variables"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
diff --git a/3.1/variables/src/main.rs b/3.1/variables/src/main.rs
new file mode 100644
index 0000000..a57709c
--- /dev/null
+++ b/3.1/variables/src/main.rs
@@ -0,0 +1,6 @@
+fn main() {
+ let mut x = 5;
+ println!("The value of x is: {x}");
+ x = 6;
+ println!("The value of x is: {x}");
+}