From 2b51554ff59d1e5cbf8dd2db65d278b0202a9102 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 27 Jun 2026 03:52:05 +0900 Subject: refactor: fix compiler warnings and clippy warnings --- crates/shirabe-php-shim/src/zip.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'crates/shirabe-php-shim/src/zip.rs') diff --git a/crates/shirabe-php-shim/src/zip.rs b/crates/shirabe-php-shim/src/zip.rs index d1db9e5..8bb51d1 100644 --- a/crates/shirabe-php-shim/src/zip.rs +++ b/crates/shirabe-php-shim/src/zip.rs @@ -210,13 +210,15 @@ impl ZipArchive { let mut file = archive.by_name(name).ok()?; let mut buf = Vec::new(); std::io::Read::read_to_end(&mut file, &mut buf).ok()?; - Some(StreamState::new( - StreamBacking::Memory(std::io::Cursor::new(buf)), - true, - false, - "r".to_string(), - format!("zip://{}", name), - )) + Some(crate::PhpResource::Stream(std::rc::Rc::new( + std::cell::RefCell::new(StreamState::new( + StreamBacking::Memory(std::io::Cursor::new(buf)), + true, + false, + "r".to_string(), + format!("zip://{}", name), + )), + ))) } pub fn add_empty_dir(&self, local_name: &str) -> bool { -- cgit v1.3.1