From 980ffa2a2bb791992ef05ca9b05aadba62ec6abc Mon Sep 17 00:00:00 2001 From: mo8it Date: Tue, 26 Mar 2024 17:49:48 +0100 Subject: [PATCH] Use == on simple enums --- src/verify.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/verify.rs b/src/verify.rs index 3123e45..e2fa98f 100644 --- a/src/verify.rs +++ b/src/verify.rs @@ -51,6 +51,7 @@ pub fn verify<'a>( Ok(()) } +#[derive(PartialEq, Eq)] enum RunMode { Interactive, NonInteractive, @@ -124,7 +125,7 @@ fn compile_and_test( if verbose { println!("{}", output.stdout); } - if let RunMode::Interactive = run_mode { + if run_mode == RunMode::Interactive { Ok(prompt_for_completion(exercise, None, success_hints)) } else { Ok(true)