Skip to content
Snippets Groups Projects
Commit 5fd5d31b authored by Edvin Åkerfeldt's avatar Edvin Åkerfeldt
Browse files

Cli, change naming for examples

parent 5b12942e
No related branches found
No related tags found
No related merge requests found
......@@ -22,8 +22,8 @@ enum Example {
arg_enum! {
#[derive(Debug)]
enum Example {
POSSIBLE,
IMPOSSIBLE
Schedulable,
NotSchedulable
}
}
......@@ -49,11 +49,11 @@ struct Opt {
verbose: u8,
/// Generate an example file
#[structopt(long)] //
#[structopt(long)]
generate: bool,
#[structopt(short = "ex", long = "example", possible_values = &Example::variants(), case_insensitive = true, default_value = "possible")]
/// The example you want to generate
#[structopt(short = "ex", long = "example", possible_values = &Example::variants(), case_insensitive = true, default_value = "Schedulable")]
example: Example,
/// Output file for generated example
......@@ -85,11 +85,11 @@ fn real_main() -> i32 {
verbose_p!("Parameters: {:?}", opt, 1);
if opt.generate {
let tasks = match opt.example {
Example::POSSIBLE => {
Example::Schedulable => {
verbose_p!("{}", "Generating a schedulable task set", 1);
schedulable_task_set()
},
Example::IMPOSSIBLE => {
Example::NotSchedulable => {
verbose_p!("{}", "Generating a non-schedulable task set", 1);
non_schedulable_task_set()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment