Skip to content

refactor: fix non-idiomatic boolean comparisons from Zig port#30930

Open
Liohtml wants to merge 1 commit into
oven-sh:mainfrom
Liohtml:claude/fix-boolean-comparisons
Open

refactor: fix non-idiomatic boolean comparisons from Zig port#30930
Liohtml wants to merge 1 commit into
oven-sh:mainfrom
Liohtml:claude/fix-boolean-comparisons

Conversation

@Liohtml
Copy link
Copy Markdown

@Liohtml Liohtml commented May 17, 2026

Summary

  • Fix two non-idiomatic boolean comparison patterns left over from the Zig-to-Rust port:
    • Blob.rs:2304: file.seekable.unwrap_or(true) == false!file.seekable.unwrap_or(true)
    • pack_command.rs:1457: !b == true!b
  • Similar in spirit to refactor: remove unsafe for static strings #30867 (remove unsafe for static strings) — mechanical cleanup of port artifacts

Test plan

  • No behavioral change — purely cosmetic refactor
  • Existing tests should continue to pass

🤖 Generated with Claude Code

- Blob.rs: `== false` → `!` (seekable check)
- pack_command.rs: `!b == true` → `!b` (bundled deps check)

Similar to oven-sh#30867's cleanup of post-port artifacts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 31792338-4ce9-4bc6-861f-0a14341f32a1

📥 Commits

Reviewing files that changed from the base of the PR and between 172afa5 and 1803d92.

📒 Files selected for processing (2)
  • src/runtime/cli/pack_command.rs
  • src/runtime/webcore/Blob.rs

Walkthrough

This PR simplifies two boolean expressions across unrelated source files. In pack_command.rs, the bundled dependencies check now uses idiomatic negation. In Blob.rs, the seekable file check adopts the same pattern. Both changes preserve semantics while improving code clarity.

Changes

Boolean Expression Simplifications

Layer / File(s) Summary
Boolean logic refactorings
src/runtime/cli/pack_command.rs, src/runtime/webcore/Blob.rs
get_bundled_deps refactors the boolean false case to use if !b syntax, and BlobExt::get_size simplifies the seekable file check from explicit equality to negated form, both preserving control flow.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing non-idiomatic boolean comparisons from a Zig-to-Rust port, which matches the changeset perfectly.
Description check ✅ Passed The description is comprehensive and covers the required template sections with specific details about changes, context, and test plan; however, it lacks explicit verification details.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant