mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-21 21:42:23 -05:00
Use == on simple enums
This commit is contained in:
parent
1f2029ae55
commit
980ffa2a2b
1 changed files with 2 additions and 1 deletions
|
@ -51,6 +51,7 @@ pub fn verify<'a>(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(PartialEq, Eq)]
|
||||||
enum RunMode {
|
enum RunMode {
|
||||||
Interactive,
|
Interactive,
|
||||||
NonInteractive,
|
NonInteractive,
|
||||||
|
@ -124,7 +125,7 @@ fn compile_and_test(
|
||||||
if verbose {
|
if verbose {
|
||||||
println!("{}", output.stdout);
|
println!("{}", output.stdout);
|
||||||
}
|
}
|
||||||
if let RunMode::Interactive = run_mode {
|
if run_mode == RunMode::Interactive {
|
||||||
Ok(prompt_for_completion(exercise, None, success_hints))
|
Ok(prompt_for_completion(exercise, None, success_hints))
|
||||||
} else {
|
} else {
|
||||||
Ok(true)
|
Ok(true)
|
||||||
|
|
Loading…
Reference in a new issue