summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-06-14 18:11:13 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-06-14 18:11:13 +0530
commit84f0f259ddba119666bf5b257c8b07f9cc28391c (patch)
tree9e65b25c7295e60a6313cd56e81d4cbf4730f945 /src/main.rs
parentfb35686f6b2ce3baf2596eef8ce062e0aa9e1af1 (diff)
Using CLI arguments as data type
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index b1465cb..423a643 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,2 +1,6 @@
let pattern = std::env::args().nth(1).expect("no pattern given");
let path = std::env::args().nth(2).expect("no path given");
+let args = Cli {
+ pattern: pattern,
+ path: std::path::PathBuf::from(path),
+};