rustlings-solutions/src/main.rs

22 lines
418 B
Rust
Raw Normal View History

2018-05-14 17:13:13 +00:00
#[macro_use]
extern crate quicli;
2018-05-06 16:59:50 +00:00
extern crate ansi_term;
use quicli::prelude::*;
2018-05-16 13:23:14 +00:00
use ansi_term::Color::Yellow;
2018-05-14 16:41:58 +00:00
2018-05-16 13:23:14 +00:00
#[macro_use] mod macros;
2018-05-14 16:41:58 +00:00
mod about_variables;
2018-05-06 16:59:50 +00:00
#[derive(Debug, StructOpt)]
struct Cli {
exercise: Option<String>,
}
2018-05-14 17:13:13 +00:00
main!(|args: Cli| if let Some(e) = args.exercise {
println!("selected {}", e);
} else {
println!("Welcome to {}", Yellow.paint("rustlings"));
2018-05-16 13:23:14 +00:00
about_variables::exec();
2018-05-06 16:59:50 +00:00
});