mirror of
https://github.com/rust-lang/rustlings
synced 2024-11-16 12:12:54 +00: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"));
|
||
|
}
|
||
|
}
|
||
|
});
|