Fix clippy::semicolon_if_nothing_returned warnings#224
Merged
Brooooooklyn merged 2 commits intomainfrom Oct 15, 2025
Merged
Conversation
Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix clippy::semicolon_if_nothing_returned warnings
Fix clippy::semicolon_if_nothing_returned warnings
Oct 14, 2025
Brooooooklyn
approved these changes
Oct 15, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes two clippy::semicolon_if_nothing_returned warnings by adding semicolons to statements that return the unit type ().
Key Changes
- Added semicolons to two statements that don't return values to comply with Rust style conventions
- Ensures consistent formatting across the codebase
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/fspy_preload_unix/src/interceptions/spawn/exec/mod.rs | Added semicolon after pre_exec.run()? call |
| crates/fspy/src/command.rs | Added semicolon after .collect() assignment |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes two
clippy::semicolon_if_nothing_returnedwarnings to ensure consistent formatting across the codebase.Changes
Added semicolons to statements that return nothing (unit type
()) in two locations:crates/fspy_preload_unix/src/interceptions/spawn/exec/mod.rs- Added semicolon afterpre_exec.run()?in the exec handlercrates/fspy/src/command.rs- Added semicolon after theself.envsassignment statementWhy
The clippy lint
semicolon_if_nothing_returnedencourages consistent formatting by requiring semicolons on statements that don't return a value. This makes the code more readable and follows Rust's style conventions.Before:
After:
Testing
cargo clippy --workspace -- -W clippy::semicolon_if_nothing_returned- no warnings remainOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.