diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-27 00:49:33 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-27 00:54:09 +0900 |
| commit | cc5d73c05a0abca2eebcc8a6afa0b1543ee49850 (patch) | |
| tree | 091a0d01232d927f13f3ab22700701804980f231 /crates/shirabe/src/downloader/fossil_downloader.rs | |
| parent | c5850d62beabef0a6bcc4cf6a179589c0ba8f405 (diff) | |
| download | php-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/fossil_downloader.rs')
| -rw-r--r-- | crates/shirabe/src/downloader/fossil_downloader.rs | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/crates/shirabe/src/downloader/fossil_downloader.rs b/crates/shirabe/src/downloader/fossil_downloader.rs index 9f0277e..fae3bd4 100644 --- a/crates/shirabe/src/downloader/fossil_downloader.rs +++ b/crates/shirabe/src/downloader/fossil_downloader.rs @@ -5,7 +5,7 @@ use crate::downloader::DownloaderInterface; use crate::downloader::VcsDownloaderBase; use crate::io::IOInterface; use crate::io::IOInterfaceImmutable; -use crate::package::PackageInterface; +use crate::package::PackageInterfaceHandle; use crate::util::Filesystem; use crate::util::ProcessExecutor; use anyhow::Result; @@ -31,17 +31,17 @@ impl FossilDownloader { pub(crate) async fn do_download( &self, - _package: &dyn PackageInterface, + _package: PackageInterfaceHandle, _path: String, _url: String, - _prev_package: Option<&dyn PackageInterface>, + _prev_package: Option<PackageInterfaceHandle>, ) -> Result<Option<PhpMixed>> { Ok(None) } pub(crate) async fn do_install( &self, - package: &dyn PackageInterface, + package: PackageInterfaceHandle, path: String, url: String, ) -> Result<Option<PhpMixed>> { @@ -101,8 +101,8 @@ impl FossilDownloader { pub(crate) async fn do_update( &self, - _initial: &dyn PackageInterface, - target: &dyn PackageInterface, + _initial: PackageInterfaceHandle, + target: PackageInterfaceHandle, path: String, url: String, ) -> Result<Option<PhpMixed>> { @@ -153,7 +153,7 @@ impl FossilDownloader { pub fn get_local_changes( &self, - _package: &dyn PackageInterface, + _package: PackageInterfaceHandle, path: String, ) -> Option<String> { if !self.has_metadata_repository(&path) { @@ -259,9 +259,9 @@ impl DownloaderInterface for FossilDownloader { 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>> { todo!() @@ -270,16 +270,16 @@ impl DownloaderInterface for FossilDownloader { async fn prepare( &self, _type: &str, - _package: &dyn PackageInterface, + _package: PackageInterfaceHandle, _path: &str, - _prev_package: Option<&dyn PackageInterface>, + _prev_package: Option<PackageInterfaceHandle>, ) -> Result<Option<PhpMixed>> { todo!() } async fn install( &self, - _package: &dyn PackageInterface, + _package: PackageInterfaceHandle, _path: &str, _output: bool, ) -> Result<Option<PhpMixed>> { @@ -288,8 +288,8 @@ impl DownloaderInterface for FossilDownloader { async fn update( &self, - _initial: &dyn PackageInterface, - _target: &dyn PackageInterface, + _initial: PackageInterfaceHandle, + _target: PackageInterfaceHandle, _path: &str, ) -> Result<Option<PhpMixed>> { todo!() @@ -297,7 +297,7 @@ impl DownloaderInterface for FossilDownloader { async fn remove( &self, - _package: &dyn PackageInterface, + _package: PackageInterfaceHandle, _path: &str, _output: bool, ) -> Result<Option<PhpMixed>> { @@ -307,9 +307,9 @@ impl DownloaderInterface for FossilDownloader { async fn cleanup( &self, _type: &str, - _package: &dyn PackageInterface, + _package: PackageInterfaceHandle, _path: &str, - _prev_package: Option<&dyn PackageInterface>, + _prev_package: Option<PackageInterfaceHandle>, ) -> Result<Option<PhpMixed>> { todo!() } |
