diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-27 03:52:05 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-27 04:21:34 +0900 |
| commit | 2b51554ff59d1e5cbf8dd2db65d278b0202a9102 (patch) | |
| tree | f4d9b0abf4df9b5e363e3bd65511d70e3d5ada00 /crates/shirabe-php-shim/src/zip.rs | |
| parent | cc07b5abb83a40d678401c335bdc49bb81b72c5f (diff) | |
| download | php-shirabe-2b51554ff59d1e5cbf8dd2db65d278b0202a9102.tar.gz php-shirabe-2b51554ff59d1e5cbf8dd2db65d278b0202a9102.tar.zst php-shirabe-2b51554ff59d1e5cbf8dd2db65d278b0202a9102.zip | |
refactor: fix compiler warnings and clippy warnings
Diffstat (limited to 'crates/shirabe-php-shim/src/zip.rs')
| -rw-r--r-- | crates/shirabe-php-shim/src/zip.rs | 16 |
1 files changed, 9 insertions, 7 deletions
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 { |
