style: fix clippy::redundant_closure_for_method_calls warnings#230
Merged
Merged
Conversation
Replace redundant closures with direct method references: - with_argv.rs: Replace |p| p.is_null() with <*const i8>::is_null - which.rs: Replace |s| s.to_owned() with BStr::to_owned 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses Clippy warnings by replacing redundant closures with direct method references, improving code conciseness without changing functionality.
- Replaced closure
|p| p.is_null()with direct method reference<*const i8>::is_null - Replaced closure
|s| s.to_owned()with direct method referenceBStr::to_owned
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/fspy_shared_unix/src/exec/which.rs | Simplified closure to method reference for BStr::to_owned in test |
| crates/fspy_preload_unix/src/interceptions/spawn/exec/with_argv.rs | Simplified closure to method reference for pointer null check |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Oct 16, 2025
fengmk2
reviewed
Oct 16, 2025
fengmk2
approved these changes
Oct 16, 2025
Member
Author
Merge activity
|
Brooooooklyn
deleted the
fix/clippy-redundant-closure-for-method-calls
branch
October 17, 2025 06:08
2 tasks
fengmk2
pushed a commit
that referenced
this pull request
Mar 12, 2026
## Summary - Bump vite-task dependency from `1acf3eec` to `7e28617` (latest main) - Picks up: fix for self-referential package dependency edges in workspace graph (#230) ## Test plan - [x] `cargo check --all-targets --all-features` passes locally - [ ] CI passes
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.

Replace redundant closures with direct method references:
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com