diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-20 01:16:50 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-20 02:22:41 +0900 |
| commit | efec43b3b8827820cf35fe1b73d8e33f5fe84eb4 (patch) | |
| tree | a62bbba72324de48be5f8e689559f8d9e288fc61 /crates/shirabe/src/command/validate_command.rs | |
| parent | cac18ef73a39b4ac41fa4d6ccb753804d4c42cb7 (diff) | |
| download | php-shirabe-efec43b3b8827820cf35fe1b73d8e33f5fe84eb4.tar.gz php-shirabe-efec43b3b8827820cf35fe1b73d8e33f5fe84eb4.tar.zst php-shirabe-efec43b3b8827820cf35fe1b73d8e33f5fe84eb4.zip | |
refactor: auto-fix clippy warnings
Diffstat (limited to 'crates/shirabe/src/command/validate_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/validate_command.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/crates/shirabe/src/command/validate_command.rs b/crates/shirabe/src/command/validate_command.rs index 5fc8f3d..a32a10c 100644 --- a/crates/shirabe/src/command/validate_command.rs +++ b/crates/shirabe/src/command/validate_command.rs @@ -32,6 +32,12 @@ pub struct ValidateCommand { base_command_data: BaseCommandData, } +impl Default for ValidateCommand { + fn default() -> Self { + Self::new() + } +} + impl ValidateCommand { pub fn new() -> Self { let mut command = ValidateCommand { @@ -325,6 +331,7 @@ impl BaseCommand for ValidateCommand { } impl ValidateCommand { + #[allow(clippy::too_many_arguments, reason = "to keep PHP signature")] fn output_result( &self, io: std::rc::Rc<std::cell::RefCell<dyn IOInterface>>, @@ -387,16 +394,16 @@ impl ValidateCommand { if !publish_errors.is_empty() && check_publish { *publish_errors = publish_errors.iter().map(|e| format!("- {}", e)).collect(); publish_errors.insert(0, "# Publish errors".to_string()); - errors.extend(publish_errors.drain(..)); + errors.append(publish_errors); } if !lock_errors.is_empty() { if check_lock { lock_errors.insert(0, "# Lock file errors".to_string()); - errors.extend(lock_errors.drain(..)); + errors.append(lock_errors); } else { lock_errors.insert(0, "# Lock file warnings".to_string()); - extra_warnings.extend(lock_errors.drain(..)); + extra_warnings.append(lock_errors); } } |
