aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/command')
-rw-r--r--crates/shirabe/src/command/base_command.rs4
-rw-r--r--crates/shirabe/src/command/diagnose_command.rs8
2 files changed, 6 insertions, 6 deletions
diff --git a/crates/shirabe/src/command/base_command.rs b/crates/shirabe/src/command/base_command.rs
index 40253d4..c4bfaef 100644
--- a/crates/shirabe/src/command/base_command.rs
+++ b/crates/shirabe/src/command/base_command.rs
@@ -13,7 +13,7 @@ use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::{
AsAny, InvalidArgumentException, LogicException, PhpMixed, RuntimeException,
- UnexpectedValueException, count, explode, in_array, is_string, max,
+ UnexpectedValueException, count, explode, in_array, is_string,
};
use std::cell::RefCell;
use std::rc::Rc;
@@ -590,7 +590,7 @@ impl BaseCommand for BaseCommandData {
if Platform::is_windows() {
width -= 1;
} else {
- width = max(80, width);
+ width = width.max(80);
}
width
diff --git a/crates/shirabe/src/command/diagnose_command.rs b/crates/shirabe/src/command/diagnose_command.rs
index 304f26f..43e878d 100644
--- a/crates/shirabe/src/command/diagnose_command.rs
+++ b/crates/shirabe/src/command/diagnose_command.rs
@@ -16,8 +16,8 @@ use shirabe_php_shim::{
PHP_WINDOWS_VERSION_BUILD, PhpMixed, RuntimeException, count, curl_version, defined,
disk_free_space, extension_loaded, file_exists, filter_var, function_exists, get_class,
get_class_err, hash, implode, ini_get, ioncube_loader_iversion, ioncube_loader_version,
- is_array, is_string, key, max, ob_get_clean, ob_start, phpinfo, reset, rtrim, sprintf,
- str_contains, str_replace, str_starts_with, strpos, strstr, strtolower, trim, version_compare,
+ is_array, is_string, key, ob_get_clean, ob_start, phpinfo, reset, rtrim, sprintf, str_contains,
+ str_replace, str_starts_with, strpos, strstr, strtolower, trim, version_compare,
};
use std::cell::RefCell;
use std::rc::Rc;
@@ -1141,9 +1141,9 @@ impl DiagnoseCommand {
}
// Apply exit code updates after io borrow ends
if had_error {
- self.exit_code = max(prev_exit_code, 2);
+ self.exit_code = prev_exit_code.max(2);
} else if had_warning {
- self.exit_code = max(prev_exit_code, 1);
+ self.exit_code = prev_exit_code.max(1);
}
}