diff options
author | Saumit Dinesan <justsaumit@protonmail.com> | 2022-06-14 18:10:19 +0530 |
---|---|---|
committer | Saumit Dinesan <justsaumit@protonmail.com> | 2022-06-14 18:10:19 +0530 |
commit | fb35686f6b2ce3baf2596eef8ce062e0aa9e1af1 (patch) | |
tree | d3ddb82ebfad8d6bd773e3a6dc482e9e499d6664 /src | |
parent | 5652175a94163b8d1d4ad7fd9c2cbde5956bc1a1 (diff) |
getting the raw arguments
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index e7a11a9..b1465cb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,2 @@ -fn main() { - println!("Hello, world!"); -} +let pattern = std::env::args().nth(1).expect("no pattern given"); +let path = std::env::args().nth(2).expect("no path given"); |