diff --git a/compiler_tester/src/workflow.rs b/compiler_tester/src/workflow.rs index 06601aee..bc86bcf5 100644 --- a/compiler_tester/src/workflow.rs +++ b/compiler_tester/src/workflow.rs @@ -1,7 +1,9 @@ //! -//! Compiler tester workflows +//! The compiler tester workflows. //! +use std::str::FromStr; + /// /// Describes sets of actions that compiler tester is able to perform. /// @@ -12,13 +14,13 @@ pub enum Workflow { /// Build and execute tests. BuildAndRun, } -use std::str::FromStr; // any error type implementing Display is acceptable. type ParseError = &'static str; impl FromStr for Workflow { type Err = ParseError; + fn from_str(day: &str) -> Result { match day { "build" => Ok(Workflow::BuildOnly),