aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages/src/symfony/console/question/question.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/console/question/question.rs')
-rw-r--r--crates/shirabe-external-packages/src/symfony/console/question/question.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/console/question/question.rs b/crates/shirabe-external-packages/src/symfony/console/question/question.rs
index 99c9d6e..78ae9b2 100644
--- a/crates/shirabe-external-packages/src/symfony/console/question/question.rs
+++ b/crates/shirabe-external-packages/src/symfony/console/question/question.rs
@@ -219,15 +219,15 @@ impl Question {
&mut self,
attempts: Option<i64>,
) -> Result<&mut Self, InvalidArgumentException> {
- if let Some(attempts) = attempts {
- if attempts < 1 {
- return Err(InvalidArgumentException(
- shirabe_php_shim::InvalidArgumentException {
- message: "Maximum number of attempts must be a positive value.".to_string(),
- code: 0,
- },
- ));
- }
+ if let Some(attempts) = attempts
+ && attempts < 1
+ {
+ return Err(InvalidArgumentException(
+ shirabe_php_shim::InvalidArgumentException {
+ message: "Maximum number of attempts must be a positive value.".to_string(),
+ code: 0,
+ },
+ ));
}
self.attempts = attempts;