This repository has been archived on 2023-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
rustlings-exercises-completed/src/main.rs

22 lines
421 B
Rust
Raw Normal View History

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