diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-17 02:53:53 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-17 02:53:53 +0900 |
| commit | a1c7e6908a26e10f6e1f23a51721664b5e2d838d (patch) | |
| tree | c575c76f1b43359ed74913da4c6a2636643f1ba0 /crates/shirabe/src/util/loop.rs | |
| parent | 7f606f36fef0c0467c3c0db3d0da33af486dae8a (diff) | |
| download | php-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.tar.gz php-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.tar.zst php-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.zip | |
chore(style): cargo fmt
Diffstat (limited to 'crates/shirabe/src/util/loop.rs')
| -rw-r--r-- | crates/shirabe/src/util/loop.rs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/crates/shirabe/src/util/loop.rs b/crates/shirabe/src/util/loop.rs index 41e1f25..189b8a3 100644 --- a/crates/shirabe/src/util/loop.rs +++ b/crates/shirabe/src/util/loop.rs @@ -1,12 +1,12 @@ //! ref: composer/src/Composer/Util/Loop.php +use crate::util::http_downloader::HttpDownloader; +use crate::util::process_executor::ProcessExecutor; use anyhow::Result; use indexmap::IndexMap; -use shirabe_php_shim::microtime; use shirabe_external_packages::react::promise::promise_interface::PromiseInterface; use shirabe_external_packages::symfony::component::console::helper::progress_bar::ProgressBar; -use crate::util::http_downloader::HttpDownloader; -use crate::util::process_executor::ProcessExecutor; +use shirabe_php_shim::microtime; #[derive(Debug)] pub struct Loop { @@ -17,7 +17,10 @@ pub struct Loop { } impl Loop { - pub fn new(mut http_downloader: HttpDownloader, process_executor: Option<ProcessExecutor>) -> Self { + pub fn new( + mut http_downloader: HttpDownloader, + process_executor: Option<ProcessExecutor>, + ) -> Self { http_downloader.enable_async(); let process_executor = process_executor.map(|mut pe| { @@ -41,7 +44,11 @@ impl Loop { self.process_executor.as_ref() } - pub fn wait(&mut self, promises: Vec<Box<dyn PromiseInterface>>, progress: Option<&mut ProgressBar>) -> Result<()> { + pub fn wait( + &mut self, + promises: Vec<Box<dyn PromiseInterface>>, + progress: Option<&mut ProgressBar>, + ) -> Result<()> { let mut uncaught: Option<anyhow::Error> = None; shirabe_external_packages::react::promise::all(&promises).then( |
