rustlings/src/main.rs

23 lines
421 B
Rust
Raw Normal View History

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