From 53f1fb395f33e0fb8db9aebd09ea9082f650f9f1 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 28 Jun 2026 17:45:06 +0900 Subject: refactor: add linter --- crates/shirabe/src/util/http_downloader.rs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'crates/shirabe/src/util/http_downloader.rs') diff --git a/crates/shirabe/src/util/http_downloader.rs b/crates/shirabe/src/util/http_downloader.rs index a6b62d7..18e320c 100644 --- a/crates/shirabe/src/util/http_downloader.rs +++ b/crates/shirabe/src/util/http_downloader.rs @@ -1,17 +1,5 @@ //! ref: composer/src/Composer/Util/HttpDownloader.php -use anyhow::Result; -use indexmap::IndexMap; - -use crate::util::Silencer; -use shirabe_external_packages::composer::pcre::{CaptureKey, Preg}; -use shirabe_php_shim::{ - InvalidArgumentException, LogicException, PhpMixed, array_replace_recursive, chr, - extension_loaded, file_get_contents, function_exists, implode, is_numeric, rawurldecode, - stream_context_create, stripos, strpos, substr, ucfirst, -}; -use shirabe_semver::constraint::SimpleConstraint; - use crate::composer; use crate::config::Config; use crate::downloader::TransportException; @@ -21,10 +9,20 @@ use crate::package::version::VersionParser; use crate::util::GetResult; use crate::util::Platform; use crate::util::RemoteFilesystem; +use crate::util::Silencer; use crate::util::StreamContextFactory; use crate::util::Url; use crate::util::http::CurlDownloader; use crate::util::http::Response; +use anyhow::Result; +use indexmap::IndexMap; +use shirabe_external_packages::composer::pcre::{CaptureKey, Preg}; +use shirabe_php_shim::{ + InvalidArgumentException, LogicException, PhpMixed, array_replace_recursive, chr, + extension_loaded, file_get_contents, function_exists, implode, is_numeric, rawurldecode, + stream_context_create, stripos, strpos, substr, ucfirst, +}; +use shirabe_semver::constraint::SimpleConstraint; /// @phpstan-type Request array{url: non-empty-string, options: mixed[], copyTo: string|null} /// @phpstan-type Job array{id: int, status: int, request: Request, sync: bool, origin: string, resolve?: callable, reject?: callable, curl_id?: int, response?: Response, exception?: \Throwable} -- cgit v1.3.1