From 7edf4a788800c4a7029fed7d7dc9f6f9c78c8636 Mon Sep 17 00:00:00 2001 From: tobyatgithub Date: Fri, 22 Oct 2021 16:22:09 -0700 Subject: [PATCH] cache chapter 3.0 --- projects/variables/Cargo.lock | 7 +++++++ projects/variables/Cargo.toml | 8 ++++++++ projects/variables/src/main.rs | 8 ++++++++ 3 files changed, 23 insertions(+) create mode 100644 projects/variables/Cargo.lock create mode 100644 projects/variables/Cargo.toml create mode 100644 projects/variables/src/main.rs diff --git a/projects/variables/Cargo.lock b/projects/variables/Cargo.lock new file mode 100644 index 00000000..a6daf1d1 --- /dev/null +++ b/projects/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/projects/variables/Cargo.toml b/projects/variables/Cargo.toml new file mode 100644 index 00000000..a3acca09 --- /dev/null +++ b/projects/variables/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "variables" +version = "0.1.0" +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/projects/variables/src/main.rs b/projects/variables/src/main.rs new file mode 100644 index 00000000..963b60ac --- /dev/null +++ b/projects/variables/src/main.rs @@ -0,0 +1,8 @@ +fn main() { + const MAX_POINTS: u32 = 100_000; + // let x = 5; + let mut x = 5; + println!("The value of x is: {}", x); + x = 6; + println!("The value of x is: {}", x); +}