aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/repository/path_repository.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-26 20:04:02 +0900
committernsfisis <nsfisis@gmail.com>2026-05-26 20:04:02 +0900
commitf411daceacad66e0bd774fda7d3c5ef8533cc55c (patch)
treeeefb065e4d676a3f7031ca49bab21c773b00b134 /crates/shirabe/src/repository/path_repository.rs
parent1921f173ea219cb4b25847294d2d3fa465550fbb (diff)
downloadphp-shirabe-f411daceacad66e0bd774fda7d3c5ef8533cc55c.tar.gz
php-shirabe-f411daceacad66e0bd774fda7d3c5ef8533cc55c.tar.zst
php-shirabe-f411daceacad66e0bd774fda7d3c5ef8533cc55c.zip
refactor(io): share IOInterface via Rc<RefCell<dyn _>> handle
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/repository/path_repository.rs')
-rw-r--r--crates/shirabe/src/repository/path_repository.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/shirabe/src/repository/path_repository.rs b/crates/shirabe/src/repository/path_repository.rs
index 8d9965e..51acff0 100644
--- a/crates/shirabe/src/repository/path_repository.rs
+++ b/crates/shirabe/src/repository/path_repository.rs
@@ -44,7 +44,7 @@ impl ConfigurableRepositoryInterface for PathRepository {
impl PathRepository {
pub fn new(
repo_config: IndexMap<String, PhpMixed>,
- io: Box<dyn IOInterface>,
+ io: std::rc::Rc<std::cell::RefCell<dyn IOInterface>>,
config: std::rc::Rc<std::cell::RefCell<Config>>,
http_downloader: Option<std::rc::Rc<std::cell::RefCell<HttpDownloader>>>,
dispatcher: Option<std::rc::Rc<std::cell::RefCell<EventDispatcher>>>,
@@ -67,14 +67,14 @@ impl PathRepository {
let url = Platform::expand_path(&url_str);
let process = process.unwrap_or_else(|| {
std::rc::Rc::new(std::cell::RefCell::new(ProcessExecutor::new(Some(
- io.clone_box(),
+ io.clone(),
))))
});
let version_guesser = VersionGuesser::new(
config,
process.clone(),
VersionParser::new(),
- Some(io.clone_box()),
+ Some(io.clone()),
);
let mut options = repo_config
.get("options")