summaryrefslogtreecommitdiff
path: root/src/exercise.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/exercise.rs
parent8d62a9963708dbecd9312e8bcc4b47049c72d155 (diff)
refactor: change from match to if for NO_EMOJI
Diffstat (limited to 'src/exercise.rs')
-rw-r--r--src/exercise.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/exercise.rs b/src/exercise.rs
index 2c5d835..3d2e38d 100644
--- a/src/exercise.rs
+++ b/src/exercise.rs
@@ -127,9 +127,10 @@ name = "{}"
path = "{}.rs""#,
self.name, self.name, self.name
);
- let cargo_toml_error_msg = match env::var("NO_EMOJI").is_ok() {
- true => "Failed to write Clippy Cargo.toml file.",
- false => "Failed to write 📎 Clippy 📎 Cargo.toml file."
+ let cargo_toml_error_msg = if env::var("NO_EMOJI").is_ok() {
+ "Failed to write Clippy Cargo.toml file."
+ } else {
+ "Failed to write 📎 Clippy 📎 Cargo.toml file."
};
fs::write(CLIPPY_CARGO_TOML_PATH, cargo_toml)
.expect(cargo_toml_error_msg);