Refining Ch06.

This commit is contained in:
rust-lang.xfoss.com
2023-12-18 13:17:33 +08:00
parent f80e61a96f
commit 55746ebe6a
3 changed files with 45 additions and 20 deletions

View File

@@ -0,0 +1,8 @@
[package]
name = "option_demo"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View File

@@ -0,0 +1,6 @@
fn main() {
let x: i8 = 5;
let y: Option<i8> = Some(5);
let sum = x + y;
}