diff options
Diffstat (limited to 'crates/shirabe/src/installer/installation_manager.rs')
| -rw-r--r-- | crates/shirabe/src/installer/installation_manager.rs | 82 |
1 files changed, 43 insertions, 39 deletions
diff --git a/crates/shirabe/src/installer/installation_manager.rs b/crates/shirabe/src/installer/installation_manager.rs index 52831aa..519091f 100644 --- a/crates/shirabe/src/installer/installation_manager.rs +++ b/crates/shirabe/src/installer/installation_manager.rs @@ -6,8 +6,8 @@ use shirabe_external_packages::react::promise; use shirabe_external_packages::react::promise::promise_interface::PromiseInterface; use shirabe_external_packages::seld::signal::signal_handler::SignalHandler; use shirabe_php_shim::{ - array_search_mixed, array_splice, array_unshift, count, http_build_query, json_encode, - str_contains, str_replace, strpos, strtolower, ucfirst, InvalidArgumentException, PhpMixed, + InvalidArgumentException, PhpMixed, array_search_mixed, array_splice, array_unshift, count, + http_build_query, json_encode, str_contains, str_replace, strpos, strtolower, ucfirst, }; use crate::dependency_resolver::operation::install_operation::InstallOperation; @@ -143,7 +143,9 @@ impl InstallationManager { && self.is_package_installed(repo, alias.get_alias_of())?); } - Ok(self.get_installer(package.get_type())?.is_installed(repo, package)) + Ok(self + .get_installer(package.get_type())? + .is_installed(repo, package)) } /// Install binary for the given package. @@ -177,8 +179,10 @@ impl InstallationManager { download_only: bool, ) -> Result<()> { // @var array<callable(): ?PromiseInterface<void|null>> $cleanupPromises - let mut cleanup_promises: IndexMap<i64, Box<dyn Fn() -> Option<Box<dyn PromiseInterface>>>> = - IndexMap::new(); + let mut cleanup_promises: IndexMap< + i64, + Box<dyn Fn() -> Option<Box<dyn PromiseInterface>>>, + > = IndexMap::new(); let signal_handler = SignalHandler::create( vec