summaryrefslogtreecommitdiff
path: root/src/verify.rs
diff options
context:
space:
mode:
authorMatt Lebl <lebl.matt@gmail.com>2021-03-20 11:52:57 -0700
committerMatt Lebl <lebl.matt@gmail.com>2021-03-20 11:53:40 -0700
commit01e7f27aa6ab9ba868f3997c1e5f5d3aa0bac57a (patch)
tree938f8804e0ac6d0e39e17bebfdb0db1b4fb8bcc9 /src/verify.rs
parent8d62a9963708dbecd9312e8bcc4b47049c72d155 (diff)
refactor: change from match to if for NO_EMOJI
Diffstat (limited to 'src/verify.rs')
-rw-r--r--src/verify.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/verify.rs b/src/verify.rs
index 04acfc6..7a0e9cc 100644
--- a/src/verify.rs
+++ b/src/verify.rs
@@ -140,9 +140,10 @@ fn prompt_for_completion(exercise: &Exercise, prompt_output: Option<String>) ->
let no_emoji = env::var("NO_EMOJI").is_ok();
- let clippy_success_msg = match no_emoji {
- true => "The code is compiling, and Clippy is happy!",
- false => "The code is compiling, and 📎 Clippy 📎 is happy!"
+ let clippy_success_msg = if no_emoji {
+ "The code is compiling, and Clippy is happy!"
+ } else {
+ "The code is compiling, and 📎 Clippy 📎 is happy!"
};
let success_msg = match exercise.mode {
@@ -152,10 +153,11 @@ fn prompt_for_completion(exercise: &Exercise, prompt_output: Option<String>) ->
};
println!();
- match no_emoji {
- true => println!("~*~ {} ~*~", success_msg),
- false => println!("🎉 🎉 {} 🎉 🎉", success_msg)
- };
+ if no_emoji {
+ println!("~*~ {} ~*~", success_msg)
+ } else {
+ println!("🎉 🎉 {} 🎉 🎉", success_msg)
+ }
println!();
if let Some(output) = prompt_output {