aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-26 22:03:25 +0900
committernsfisis <nsfisis@gmail.com>2026-05-26 22:03:34 +0900
commitc5850d62beabef0a6bcc4cf6a179589c0ba8f405 (patch)
tree893e8903a8bd605da90fb5a460caba17f0789fea /crates/shirabe/src/util
parentf411daceacad66e0bd774fda7d3c5ef8533cc55c (diff)
downloadphp-shirabe-c5850d62beabef0a6bcc4cf6a179589c0ba8f405.tar.gz
php-shirabe-c5850d62beabef0a6bcc4cf6a179589c0ba8f405.tar.zst
php-shirabe-c5850d62beabef0a6bcc4cf6a179589c0ba8f405.zip
feat(factory): construct PluginManager after Rc::new_cyclic
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/util')
-rw-r--r--crates/shirabe/src/util/git.rs8
-rw-r--r--crates/shirabe/src/util/http/curl_downloader.rs8
-rw-r--r--crates/shirabe/src/util/remote_filesystem.rs6
3 files changed, 15 insertions, 7 deletions
diff --git a/crates/shirabe/src/util/git.rs b/crates/shirabe/src/util/git.rs
index 3be37f6..1f6fd0a 100644
--- a/crates/shirabe/src/util/git.rs
+++ b/crates/shirabe/src/util/git.rs
@@ -148,9 +148,11 @@ impl Git {
let mut last_command: PhpMixed = PhpMixed::String(String::new());
// Ensure we are allowed to use this URL by config
- self.config
- .borrow_mut()
- .prohibit_url_by_config(url, Some(&*self.io.borrow()), &IndexMap::new())?;
+ self.config.borrow_mut().prohibit_url_by_config(
+ url,
+ Some(&*self.io.borrow()),
+ &IndexMap::new(),
+ )?;
let orig_cwd: Option<String> = if initial_clone {
cwd.map(|s| s.to_string())
diff --git a/crates/shirabe/src/util/http/curl_downloader.rs b/crates/shirabe/src/util/http/curl_downloader.rs
index 87ea8ef..71c0b5a 100644
--- a/crates/shirabe/src/util/http/curl_downloader.rs
+++ b/crates/shirabe/src/util/http/curl_downloader.rs
@@ -339,9 +339,11 @@ impl CurlDownloader {
if !Preg::is_match(r"{^http://(repo\.)?packagist\.org/p/}", url).unwrap_or(false)
|| (strpos(url, "$").is_none() && strpos(url, "%24").is_none())
{
- self.config
- .borrow_mut()
- .prohibit_url_by_config(url, Some(&*self.io.borrow()), &options)?;
+ self.config.borrow_mut().prohibit_url_by_config(
+ url,
+ Some(&*self.io.borrow()),
+ &options,
+ )?;
}
let curl_handle = curl_init();
diff --git a/crates/shirabe/src/util/remote_filesystem.rs b/crates/shirabe/src/util/remote_filesystem.rs
index 8d50fa4..9aa40bd 100644
--- a/crates/shirabe/src/util/remote_filesystem.rs
+++ b/crates/shirabe/src/util/remote_filesystem.rs
@@ -337,7 +337,11 @@ impl RemoteFilesystem {
PhpMixed::Array(m) => m.into_iter().map(|(k, v)| (k, *v)).collect(),
_ => IndexMap::new(),
};
- let _ = HttpDownloader::output_warnings(&*self.io.borrow(), origin_url, &parsed_map);
+ let _ = HttpDownloader::output_warnings(
+ &*self.io.borrow(),
+ origin_url,
+ &parsed_map,
+ );
}
if [401_i64, 403].contains(&code) && retry_auth_failure {