mirror of
https://github.com/notohh/rustlings.git
synced 2025-07-26 15:20:05 -04:00
refactor: change from match to if for NO_EMOJI
This commit is contained in:
parent
8d62a99637
commit
01e7f27aa6
3 changed files with 37 additions and 40 deletions
src
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue