parse_argument 0.1.5

A simple way to deal with taking in commandline arguments
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! parse_argument can also be used for Strings, as it does have the FromStr trait, but having spaces in them isn't supported yet.
use parse_argument::parse_argument;

fn main() {
    let argument = parse_argument::<String>("string")
        .unwrap_or(Ok(String::from("default")))
        // shouldn't ever be an error so we can safely unwrap it.
        .unwrap()
    ;

    println!("{argument:?}");
}