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/base_dependency_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/base_dependency_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/base_dependency_command.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/shirabe/src/command/base_dependency_command.rs b/crates/shirabe/src/command/base_dependency_command.rs index 5424dd1..98a2622 100644 --- a/crates/shirabe/src/command/base_dependency_command.rs +++ b/crates/shirabe/src/command/base_dependency_command.rs @@ -90,8 +90,8 @@ pub trait BaseDependencyCommand: BaseCommand { let local_repo = repository_manager.get_local_repository(); let root_pkg = composer.get_package(); - if local_repo.get_packages()?.len() == 0 - && (root_pkg.get_requires().len() > 0 || root_pkg.get_dev_requires().len() > 0) + if local_repo.get_packages()?.is_empty() + && (!root_pkg.get_requires().is_empty() || !root_pkg.get_dev_requires().is_empty()) { output.borrow().writeln( &["<warning>No dependencies installed. Try running composer install or update, or use --locked.</warning>".to_string()], @@ -451,7 +451,7 @@ pub trait BaseDependencyCommand: BaseCommand { "" }; self.write_tree_line( - &format!( + format!( "{}{}{} ({}) {}", prefix, if is_last { "└──" } else { "├──" }, @@ -459,8 +459,7 @@ pub trait BaseDependencyCommand: BaseCommand { link_text, circular_warn ) - .trim_end() - .to_string(), + .trim_end(), ); if let Some(children_vec) = children { self.print_tree( |
