From bcc303880f7078d612207571e196697a0d0b35bf Mon Sep 17 00:00:00 2001 From: garhve Date: Mon, 9 Jan 2023 18:34:39 +0800 Subject: finish chapter 11 --- rust/theBook/chapter-12-command-line-project/minigrep/Cargo.toml | 8 ++++++++ rust/theBook/chapter-12-command-line-project/minigrep/src/main.rs | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100644 rust/theBook/chapter-12-command-line-project/minigrep/Cargo.toml create mode 100644 rust/theBook/chapter-12-command-line-project/minigrep/src/main.rs (limited to 'rust/theBook/chapter-12-command-line-project') diff --git a/rust/theBook/chapter-12-command-line-project/minigrep/Cargo.toml b/rust/theBook/chapter-12-command-line-project/minigrep/Cargo.toml new file mode 100644 index 0000000..a256566 --- /dev/null +++ b/rust/theBook/chapter-12-command-line-project/minigrep/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "minigrep" +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/rust/theBook/chapter-12-command-line-project/minigrep/src/main.rs b/rust/theBook/chapter-12-command-line-project/minigrep/src/main.rs new file mode 100644 index 0000000..ae7def5 --- /dev/null +++ b/rust/theBook/chapter-12-command-line-project/minigrep/src/main.rs @@ -0,0 +1,6 @@ +use std::env; + +fn main() { + let args: Vec = env::args().collect(); + dbg!(args); +} -- cgit v1.2.3-70-g09d2