fix ci#7774
Conversation
📝 WalkthroughWalkthroughThis PR adds ChangesPlatform Error Checking Attributes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 6/8 reviews remaining, refill in 8 minutes and 59 seconds.Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
crates/host_env/src/select.rs (1)
62-70:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winWASI
check_erris missing the#[must_use]attribute.The Unix (line 9) and Windows (line 56)
check_errhelpers both received#[must_use], but the identical function in thewasimodule at line 67 was not updated. It has the same signature (pub const fn check_err(x: i32) -> bool) and the same Clippy pedantic lint (clippy::must_use_candidate) would fire there too, leaving CI broken for WASI targets.🐛 Proposed fix
#[cfg(target_os = "wasi")] pub mod platform { pub use libc::{FD_SETSIZE, timeval}; pub use std::os::fd::RawFd; + #[must_use] pub const fn check_err(x: i32) -> bool { x < 0 }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@crates/host_env/src/select.rs` around lines 62 - 70, The WASI module's pub const fn check_err(x: i32) -> bool is missing the #[must_use] attribute like the Unix and Windows variants; add the #[must_use] attribute directly above the wasi check_err function declaration to silence the clippy must_use_candidate lint and keep behavior identical to the other platform modules.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@crates/host_env/src/select.rs`:
- Around line 62-70: The WASI module's pub const fn check_err(x: i32) -> bool is
missing the #[must_use] attribute like the Unix and Windows variants; add the
#[must_use] attribute directly above the wasi check_err function declaration to
silence the clippy must_use_candidate lint and keep behavior identical to the
other platform modules.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: b9a7e731-8634-461c-be04-86979794cea3
📒 Files selected for processing (1)
crates/host_env/src/select.rs
close #7772
Summary by CodeRabbit