minigrep_npm 1.0.1

CLI tool to search words in files
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use minigrep_npm::Arguments;
use std::env;
use std::process;

fn main() {
    // Accepting user inputed arguments from the command line
    let arg_list: Vec<String> = env::args().collect();

    let arguments = Arguments::new(&arg_list).unwrap_or_else(|err| {
        println!("Error: {}", err);
        process::exit(1);
    });

    if let Err(e) = minigrep_npm::run(arguments) {
        println!("Error: {}", e);
        process::exit(1);
    }
}