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/file_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/file_downloader.rs')
| -rw-r--r-- | crates/shirabe/src/downloader/file_downloader.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/shirabe/src/downloader/file_downloader.rs b/crates/shirabe/src/downloader/file_downloader.rs index 053a7161..d3b08b36 100644 --- a/crates/shirabe/src/downloader/file_downloader.rs +++ b/crates/shirabe/src/downloader/file_downloader.rs @@ -28,8 +28,8 @@ use indexmap::IndexMap; use shirabe_php_shim::{ DIRECTORY_SEPARATOR, InvalidArgumentException, PATHINFO_BASENAME, PATHINFO_EXTENSION, PHP_URL_PATH, PhpMixed, RuntimeException, UnexpectedValueException, array_search, file_exists, - filesize, get_class, hash, hash_file, is_dir, is_executable, parse_url, pathinfo, realpath, - rtrim, spl_object_hash, strlen, strpos, strtr, trim, umask, usleep, + filesize, get_class, hash, hash_file, impl_php_class, is_dir, is_executable, parse_url, + pathinfo, realpath, rtrim, spl_object_hash, strlen, strpos, strtr, trim, umask, usleep, }; use std::sync::{LazyLock, Mutex}; @@ -47,8 +47,6 @@ pub static DOWNLOAD_METADATA: LazyLock<Mutex<IndexMap<String, PhpMixed>>> = pub static RESPONSE_HEADERS: LazyLock<Mutex<IndexMap<String, Vec<String>>>> = LazyLock::new(|| Mutex::new(IndexMap::new())); -shirabe_php_shim::impl_php_class!(FileDownloader, r"Composer\Downloader\FileDownloader"); - /// Base downloader for files #[derive(Debug)] pub struct FileDownloader { @@ -83,6 +81,8 @@ pub struct FileDownloader { additional_cleanup_paths: std::cell::RefCell<IndexMap<String, Vec<String>>>, } +impl_php_class!(FileDownloader, r"Composer\Downloader\FileDownloader"); + impl FileDownloader { pub fn reset_download_metadata() { DOWNLOAD_METADATA.lock().unwrap().clear(); |
