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 --- .../src/symfony/process/pipes/abstract_pipes.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crates/shirabe-external-packages/src/symfony/process/pipes') diff --git a/crates/shirabe-external-packages/src/symfony/process/pipes/abstract_pipes.rs b/crates/shirabe-external-packages/src/symfony/process/pipes/abstract_pipes.rs index bafd146..43a6567 100644 --- a/crates/shirabe-external-packages/src/symfony/process/pipes/abstract_pipes.rs +++ b/crates/shirabe-external-packages/src/symfony/process/pipes/abstract_pipes.rs @@ -15,7 +15,7 @@ pub struct AbstractPipes { impl AbstractPipes { pub fn new(input: PhpMixed) -> Self { - let mut input_buffer = String::new(); + let input_buffer; let stored_input; // TODO(plugin): `$input instanceof \Iterator` is not modeled. The PHP `is_resource($input)` // branch never applies: a PhpMixed is never a resource, so input is never stored as-is here. @@ -81,9 +81,7 @@ impl AbstractPipes { let mut w: Vec = vec![stdin.clone()]; // let's have a look if something changed in streams - if php::stream_select(&mut r, &mut w, &mut e, 0, Some(0)).is_none() { - return None; - } + php::stream_select(&mut r, &mut w, &mut e, 0, Some(0))?; if !self.input_buffer.is_empty() { let written = php::fwrite(&stdin, &self.input_buffer, None).unwrap_or(0) as usize; -- cgit v1.3.1