ソースを参照

Cargo project, README & gitignore

Emilio González Montaña 4 年 前
コミット
7287416fb3
4 ファイル変更25 行追加0 行削除
  1. 3 0
      .gitignore
  2. 9 0
      Cargo.toml
  3. 7 0
      README.md
  4. 6 0
      src/main.rs

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+/.idea
+/target
+/Cargo.lock

+ 9 - 0
Cargo.toml

@@ -0,0 +1,9 @@
+[package]
+name = "variables"
+version = "0.1.0"
+authors = ["Emilio González Montaña <emilio@ociotec.com>"]
+edition = "2018"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]

+ 7 - 0
README.md

@@ -0,0 +1,7 @@
+# 04 - Variables
+
+## Build & run
+
+```
+cargo run
+```

+ 6 - 0
src/main.rs

@@ -0,0 +1,6 @@
+fn main() {
+    let mut x = 45;
+    println!("The value of x is {}", x);
+    x = 60;
+    println!("The value of x is {}", x);
+}