From 84f0f259ddba119666bf5b257c8b07f9cc28391c Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Tue, 14 Jun 2022 18:11:13 +0530 Subject: Using CLI arguments as data type --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) 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), +}; -- cgit v1.2.3