From 46384f043ad7ce81e42e54fb88c565440105ae19 Mon Sep 17 00:00:00 2001 From: Oleksandr Zarudnyi Date: Mon, 22 Apr 2024 20:21:03 +0200 Subject: [PATCH] Update workflow.rs --- compiler_tester/src/workflow.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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),