aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/downloader/tar_downloader.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-27 00:49:33 +0900
committernsfisis <nsfisis@gmail.com>2026-05-27 00:54:09 +0900
commitcc5d73c05a0abca2eebcc8a6afa0b1543ee49850 (patch)
tree091a0d01232d927f13f3ab22700701804980f231 /crates/shirabe/src/downloader/tar_downloader.rs
parentc5850d62beabef0a6bcc4cf6a179589c0ba8f405 (diff)
downloadphp-shirabe-cc5d73c05a0abca2eebcc8a6afa0b1543ee49850.tar.gz
php-shirabe-cc5d73c05a0abca2eebcc8a6afa0b1543ee49850.tar.zst
php-shirabe-cc5d73c05a0abca2eebcc8a6afa0b1543ee49850.zip
refactor(package): pass package handles by value throughout
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/downloader/tar_downloader.rs')
-rw-r--r--crates/shirabe/src/downloader/tar_downloader.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/crates/shirabe/src/downloader/tar_downloader.rs b/crates/shirabe/src/downloader/tar_downloader.rs
index 7314ecd..07d8a5f 100644
--- a/crates/shirabe/src/downloader/tar_downloader.rs
+++ b/crates/shirabe/src/downloader/tar_downloader.rs
@@ -7,7 +7,7 @@ use crate::downloader::DownloaderInterface;
use crate::downloader::FileDownloader;
use crate::event_dispatcher::EventDispatcher;
use crate::io::IOInterface;
-use crate::package::PackageInterface;
+use crate::package::PackageInterfaceHandle;
use crate::util::Filesystem;
use crate::util::HttpDownloader;
use crate::util::ProcessExecutor;
@@ -47,7 +47,7 @@ impl TarDownloader {
pub(crate) async fn extract(
&self,
- package: &dyn PackageInterface,
+ package: PackageInterfaceHandle,
file: &str,
path: &str,
) -> Result<Option<PhpMixed>> {
@@ -66,9 +66,9 @@ impl DownloaderInterface for TarDownloader {
async fn download(
&self,
- package: &dyn PackageInterface,
+ package: PackageInterfaceHandle,
path: &str,
- prev_package: Option<&dyn PackageInterface>,
+ prev_package: Option<PackageInterfaceHandle>,
output: bool,
) -> Result<Option<PhpMixed>> {
self.inner
@@ -79,9 +79,9 @@ impl DownloaderInterface for TarDownloader {
async fn prepare(
&self,
r#type: &str,
- package: &dyn PackageInterface,
+ package: PackageInterfaceHandle,
path: &str,
- prev_package: Option<&dyn PackageInterface>,
+ prev_package: Option<PackageInterfaceHandle>,
) -> Result<Option<PhpMixed>> {
self.inner
.prepare(r#type, package, path, prev_package)
@@ -90,7 +90,7 @@ impl DownloaderInterface for TarDownloader {
async fn install(
&self,
- package: &dyn PackageInterface,
+ package: PackageInterfaceHandle,
path: &str,
output: bool,
) -> Result<Option<PhpMixed>> {
@@ -99,8 +99,8 @@ impl DownloaderInterface for TarDownloader {
async fn update(
&self,
- initial: &dyn PackageInterface,
- target: &dyn PackageInterface,
+ initial: PackageInterfaceHandle,
+ target: PackageInterfaceHandle,
path: &str,
) -> Result<Option<PhpMixed>> {
self.inner.update(initial, target, path).await
@@ -108,7 +108,7 @@ impl DownloaderInterface for TarDownloader {
async fn remove(
&self,
- package: &dyn PackageInterface,
+ package: PackageInterfaceHandle,
path: &str,
output: bool,
) -> Result<Option<PhpMixed>> {
@@ -118,9 +118,9 @@ impl DownloaderInterface for TarDownloader {
async fn cleanup(
&self,
r#type: &str,
- package: &dyn PackageInterface,
+ package: PackageInterfaceHandle,
path: &str,
- prev_package: Option<&dyn PackageInterface>,
+ prev_package: Option<PackageInterfaceHandle>,
) -> Result<Option<PhpMixed>> {
self.inner
.cleanup(r#type, package, path, prev_package)