From f31b101ce1e921a026ba234b1f0a83b0392bc118 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 20 May 2026 08:33:49 +0900 Subject: fix(compile): fix all remaining compile errors Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/shirabe/src/downloader/download_manager.rs | 24 ++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'crates/shirabe/src/downloader/download_manager.rs') diff --git a/crates/shirabe/src/downloader/download_manager.rs b/crates/shirabe/src/downloader/download_manager.rs index ea2ee1e..630f16d 100644 --- a/crates/shirabe/src/downloader/download_manager.rs +++ b/crates/shirabe/src/downloader/download_manager.rs @@ -158,7 +158,7 @@ impl DownloadManager { message: sprintf( "Downloader \"%s\" is a %s type downloader and can not be used to download %s for package %s", &[ - PhpMixed::String(get_class(downloader)), + PhpMixed::String(shirabe_php_shim::get_class_obj(downloader)), PhpMixed::String(downloader.get_installation_source()), PhpMixed::String(installation_source.unwrap_or("").to_string()), PhpMixed::String(package.to_string()), @@ -273,9 +273,12 @@ impl DownloadManager { // PHP: $result->then(static fn ($res) => $res, $handleError); // TODO(phase-b): chain $handleError as the rejection handler on the promise - let res = result.then(Box::new(move |res: PhpMixed| -> Result { - Ok(res) - })); + let res = result.then( + Some(Box::new(move |res: Option| -> Option { + res + })), + None, + ); return Ok(res); } @@ -384,12 +387,15 @@ impl DownloadManager { let promise = initial_downloader.unwrap().remove2(initial, &target_dir)?; let target_dir_owned = target_dir.clone(); - // TODO(phase-b): capture self and target into the closure - Ok(promise.then(Box::new( - move |_res: PhpMixed| -> Result> { + // TODO(phase-b): capture self and target into the closure; type mismatch with then signature. + let _ = target_dir_owned; + Ok(promise.then( + Some(Box::new(move |res: Option| -> Option { + let _ = res; todo!("self.install(target, &target_dir_owned)") - }, - ))) + })), + None, + )) } /// Removes package from target dir. -- cgit v1.3.1