From f5005fccce818e5d2f33612a4cda90aad7469261 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 20 Jun 2026 02:47:21 +0900 Subject: feat(hg): implement Hg::new constructor Take config and process as shared Rc> handles matching the struct fields and Util\Git's constructor, assigning them directly. PHP stores the same Config object reference, so sharing the Rc is faithful; update the three call sites to pass cloned handles. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/util/hg.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'crates/shirabe/src/util/hg.rs') diff --git a/crates/shirabe/src/util/hg.rs b/crates/shirabe/src/util/hg.rs index d20cf16..7fbf125 100644 --- a/crates/shirabe/src/util/hg.rs +++ b/crates/shirabe/src/util/hg.rs @@ -22,10 +22,14 @@ pub struct Hg { impl Hg { pub fn new( io: std::rc::Rc>, - config: &Config, - process: &std::rc::Rc>, + config: std::rc::Rc>, + process: std::rc::Rc>, ) -> Self { - todo!() + Self { + io, + config, + process, + } } pub fn run_command( -- cgit v1.3.1