diff options
author | Saumit Dinesan <justsaumit@protonmail.com> | 2022-06-14 18:11:13 +0530 |
---|---|---|
committer | Saumit Dinesan <justsaumit@protonmail.com> | 2022-06-14 18:11:13 +0530 |
commit | 84f0f259ddba119666bf5b257c8b07f9cc28391c (patch) | |
tree | 9e65b25c7295e60a6313cd56e81d4cbf4730f945 /src | |
parent | fb35686f6b2ce3baf2596eef8ce062e0aa9e1af1 (diff) |
Using CLI arguments as data type
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 4 |
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), +}; |