aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-php-shim/src/stream.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-27 03:52:05 +0900
committernsfisis <nsfisis@gmail.com>2026-06-27 04:21:34 +0900
commit2b51554ff59d1e5cbf8dd2db65d278b0202a9102 (patch)
treef4d9b0abf4df9b5e363e3bd65511d70e3d5ada00 /crates/shirabe-php-shim/src/stream.rs
parentcc07b5abb83a40d678401c335bdc49bb81b72c5f (diff)
downloadphp-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/stream.rs')
-rw-r--r--crates/shirabe-php-shim/src/stream.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/shirabe-php-shim/src/stream.rs b/crates/shirabe-php-shim/src/stream.rs
index 606b202..98f0322 100644
--- a/crates/shirabe-php-shim/src/stream.rs
+++ b/crates/shirabe-php-shim/src/stream.rs
@@ -346,12 +346,12 @@ pub fn stream_select(
// emit a warning for them. We skip them here, leaving them out of the ready set.
let mut prepare = |set: &mut FdSet, resources: &[PhpResource]| {
for resource in resources {
- if let Some(fd) = resource.raw_fd() {
- if (fd as usize) < FD_SETSIZE {
- set.set(fd);
- if fd + 1 > nfds {
- nfds = fd + 1;
- }
+ if let Some(fd) = resource.raw_fd()
+ && (fd as usize) < FD_SETSIZE
+ {
+ set.set(fd);
+ if fd + 1 > nfds {
+ nfds = fd + 1;
}
}
}