Skip to content

style: fix clippy::redundant_closure_for_method_calls warnings#230

Merged
Brooooooklyn merged 1 commit into
mainfrom
fix/clippy-redundant-closure-for-method-calls
Oct 17, 2025
Merged

style: fix clippy::redundant_closure_for_method_calls warnings#230
Brooooooklyn merged 1 commit into
mainfrom
fix/clippy-redundant-closure-for-method-calls

Conversation

@Brooooooklyn

Copy link
Copy Markdown
Member

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

Co-Authored-By: Claude noreply@anthropic.com

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>
Copilot AI review requested due to automatic review settings October 16, 2025 13:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 reference BStr::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.

Brooooooklyn commented Oct 16, 2025

Copy link
Copy Markdown
Member Author

Comment thread crates/fspy_shared_unix/src/exec/which.rs

Brooooooklyn commented Oct 17, 2025

Copy link
Copy Markdown
Member Author

Merge activity

  • Oct 17, 6:08 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Oct 17, 6:08 AM UTC: @Brooooooklyn merged this pull request with Graphite.

@Brooooooklyn
Brooooooklyn merged commit 7c39ed6 into main Oct 17, 2025
9 checks passed
@Brooooooklyn
Brooooooklyn deleted the fix/clippy-redundant-closure-for-method-calls branch October 17, 2025 06:08
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
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.

3 participants