diff --git a/schala-repl/src/directive_actions.rs b/schala-repl/src/directive_actions.rs index 00aade5..3175a17 100644 --- a/schala-repl/src/directive_actions.rs +++ b/schala-repl/src/directive_actions.rs @@ -11,10 +11,8 @@ pub enum DirectiveAction { Help, QuitProgram, ListPasses, - TotalTimeOff, - TotalTimeOn, - StageTimeOff, - StageTimeOn, + TotalTime(bool), + StageTime(bool), Doc, } @@ -50,20 +48,12 @@ impl DirectiveAction { } Some(buf) } - TotalTimeOff => { - repl.options.show_total_time = false; + TotalTime(value) => { + repl.options.show_total_time = *value; None } - TotalTimeOn => { - repl.options.show_total_time = true; - None - } - StageTimeOff => { - repl.options.show_stage_times = false; - None - } - StageTimeOn => { - repl.options.show_stage_times = true; + StageTime(value) => { + repl.options.show_stage_times = *value; None } Doc => doc(repl, arguments), diff --git a/schala-repl/src/directives.rs b/schala-repl/src/directives.rs index 4e1c86d..6dc7216 100644 --- a/schala-repl/src/directives.rs +++ b/schala-repl/src/directives.rs @@ -54,16 +54,16 @@ fn get_list(passes_directives: &[CommandTree], include_help: bool) -> Vec