diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-14 14:13:00 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-14 14:13:00 +0900 |
| commit | 430f59c1938b9e5da381365172ab788b54895ffc (patch) | |
| tree | 180ade07dadc7793a45839f42b5674d62bc5fc00 /crates/shirabe-external-packages/src/symfony/console/question | |
| parent | ba0a7f913b4b2a83d0c8862d657bdc867730a962 (diff) | |
| download | php-shirabe-430f59c1938b9e5da381365172ab788b54895ffc.tar.gz php-shirabe-430f59c1938b9e5da381365172ab788b54895ffc.tar.zst php-shirabe-430f59c1938b9e5da381365172ab788b54895ffc.zip | |
refactor: auto-fix clippy warnings
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/console/question')
| -rw-r--r-- | crates/shirabe-external-packages/src/symfony/console/question/question.rs | 18 |
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; |
