diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-07 07:15:08 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-07 07:15:08 +0900 |
| commit | e7f83b74e8f8c12b4a1b0f9f613387b03858dbdd (patch) | |
| tree | 37fba97742e2d16ff1494eba600da52a0aac9fcf /crates/shirabe/src/downloader/zip_downloader.rs | |
| parent | 759b2980e70dfb8960238f75d68bb6dddce25414 (diff) | |
| download | php-shirabe-e7f83b74e8f8c12b4a1b0f9f613387b03858dbdd.tar.gz php-shirabe-e7f83b74e8f8c12b4a1b0f9f613387b03858dbdd.tar.zst php-shirabe-e7f83b74e8f8c12b4a1b0f9f613387b03858dbdd.zip | |
chore: use shirabe_php_shim::impl_php_class
Diffstat (limited to 'crates/shirabe/src/downloader/zip_downloader.rs')
| -rw-r--r-- | crates/shirabe/src/downloader/zip_downloader.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/shirabe/src/downloader/zip_downloader.rs b/crates/shirabe/src/downloader/zip_downloader.rs index 9d7dbe7a..350ea738 100644 --- a/crates/shirabe/src/downloader/zip_downloader.rs +++ b/crates/shirabe/src/downloader/zip_downloader.rs @@ -13,8 +13,8 @@ use shirabe_external_packages::symfony::process::ExecutableFinder; use shirabe_php_shim::{ DIRECTORY_SEPARATOR, ErrorException, PhpMixed, RuntimeException, UnexpectedValueException, ZipArchive, bin2hex, class_exists, file_exists, file_get_contents, filesize, function_exists, - hash_file, is_file, json_encode, php_regex, random_int, str_contains, str_replace, strlen, - substr, version_compare, + hash_file, impl_php_class, is_file, json_encode, php_regex, random_int, str_contains, + str_replace, strlen, substr, version_compare, }; use std::sync::Mutex; @@ -22,8 +22,6 @@ static UNZIP_COMMANDS: Mutex<Option<Vec<Vec<String>>>> = Mutex::new(None); static HAS_ZIP_ARCHIVE: Mutex<Option<bool>> = Mutex::new(None); static IS_WINDOWS: Mutex<Option<bool>> = Mutex::new(None); -shirabe_php_shim::impl_php_class!(ZipDownloader, r"Composer\Downloader\ZipDownloader"); - #[derive(Debug)] pub struct ZipDownloader { inner: FileDownloader, @@ -32,6 +30,8 @@ pub struct ZipDownloader { zip_archive_object: std::cell::RefCell<Option<ZipArchive>>, } +impl_php_class!(ZipDownloader, r"Composer\Downloader\ZipDownloader"); + impl ZipDownloader { pub fn new( io: std::rc::Rc<std::cell::RefCell<dyn crate::io::IOInterface>>, |
