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/json/json_file.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/shirabe/src/json') diff --git a/crates/shirabe/src/json/json_file.rs b/crates/shirabe/src/json/json_file.rs index 3340cae..2450b0a 100644 --- a/crates/shirabe/src/json/json_file.rs +++ b/crates/shirabe/src/json/json_file.rs @@ -19,6 +19,7 @@ use shirabe_php_shim::{ use crate::downloader::TransportException; use crate::io::IOInterface; +use crate::io::IOInterfaceImmutable; use crate::json::JsonValidationException; use crate::util::Filesystem; use crate::util::HttpDownloader; @@ -31,7 +32,7 @@ pub struct JsonFile { /// @var ?HttpDownloader http_downloader: Option>>, /// @var ?IOInterface - io: Option>, + io: Option>>, /// @var string indent: String, } @@ -69,7 +70,7 @@ impl JsonFile { pub fn new( path: String, http_downloader: Option>>, - io: Option>, + io: Option>>, ) -> Result { if http_downloader.is_none() && Preg::is_match(r"{^https?://}i", &path).unwrap_or(false) { return Err(InvalidArgumentException { -- cgit v1.3.1