mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-26 07:14:17 -05:00
22 lines
417 B
Rust
22 lines
417 B
Rust
|
#[macro_use] extern crate quicli;
|
||
|
extern crate ansi_term;
|
||
|
|
||
|
use quicli::prelude::*;
|
||
|
use ansi_term::Colour::{Red, Yellow};
|
||
|
|
||
|
#[derive(Debug, StructOpt)]
|
||
|
struct Cli {
|
||
|
exercise: Option<String>,
|
||
|
}
|
||
|
|
||
|
main!(|args: Cli| {
|
||
|
match args.exercise {
|
||
|
Some(e) => {
|
||
|
println!("selected {}", e);
|
||
|
}
|
||
|
None => {
|
||
|
println!("Welcome to {}", Yellow.paint("Rustlings"));
|
||
|
}
|
||
|
}
|
||
|
});
|