From fb35686f6b2ce3baf2596eef8ce062e0aa9e1af1 Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Tue, 14 Jun 2022 18:10:19 +0530 Subject: getting the raw arguments --- src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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"); -- cgit v1.2.3