From f411daceacad66e0bd774fda7d3c5ef8533cc55c Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 26 May 2026 20:04:02 +0900 Subject: refactor(io): share IOInterface via Rc> handle Co-Authored-By: Claude Opus 4.7 --- crates/shirabe/src/util/perforce.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crates/shirabe/src/util/perforce.rs') diff --git a/crates/shirabe/src/util/perforce.rs b/crates/shirabe/src/util/perforce.rs index 10c426f..cd384fc 100644 --- a/crates/shirabe/src/util/perforce.rs +++ b/crates/shirabe/src/util/perforce.rs @@ -12,6 +12,7 @@ use shirabe_php_shim::{ }; use crate::io::IOInterface; +use crate::io::IOInterfaceImmutable; use crate::util::Filesystem; use crate::util::Platform; use crate::util::ProcessExecutor; @@ -33,7 +34,7 @@ pub struct Perforce { pub(crate) unique_perforce_client_name: String, pub(crate) windows_flag: bool, pub(crate) command_result: String, - pub(crate) io: Box, + pub(crate) io: std::rc::Rc>, pub(crate) filesystem: Option>>, } @@ -45,7 +46,7 @@ impl Perforce { path: String, process: std::rc::Rc>, is_windows: bool, - io: Box, + io: std::rc::Rc>, ) -> Self { let mut this = Self { path: String::new(), @@ -76,7 +77,7 @@ impl Perforce { port: String, path: String, process: std::rc::Rc>, - io: Box, + io: std::rc::Rc>, ) -> Self { Self::new(repo_config, port, path, process, Platform::is_windows(), io) } -- cgit v1.3.1