1
1
mirror of https://github.com/casey/just.git synced 2024-11-22 10:26:26 +03:00

Condense enabled condition

This commit is contained in:
Casey Rodarmor 2022-10-28 10:00:03 -07:00
parent 5451a7f4f9
commit 474490ede3

View File

@ -72,21 +72,12 @@ impl<'src, D> Recipe<'src, D> {
let macos = self.attributes.contains(&Attribute::Macos);
let unix = self.attributes.contains(&Attribute::Unix);
if !(windows || linux || macos || unix) {
true
} else if cfg!(target_os = "windows") {
windows
} else if cfg!(target_os = "linux") {
linux || unix
} else if cfg!(target_os = "macos") {
macos || unix
} else if cfg!(windows) {
windows
} else if cfg!(unix) {
unix
} else {
false
}
(!windows && !linux && !macos && !unix)
|| (cfg!(target_os = "windows") && windows)
|| (cfg!(target_os = "linux") && (linux || unix))
|| (cfg!(target_os = "macos") && (macos || unix))
|| (cfg!(windows) && windows)
|| (cfg!(unix) && unix)
}
fn print_exit_message(&self) -> bool {