Skip to content

chore: fix master fmt + clippy hygiene - #5728

Merged
oferchen merged 3 commits into
masterfrom
fix/master-fmt-clippy-hygiene
Jun 12, 2026
Merged

oferchen merged 3 commits into
masterfrom
fix/master-fmt-clippy-hygiene

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

Master CI is failing fmt+clippy on multiple PRs because of three drifts:

  1. fmt in `crates/cli/src/frontend/server/run.rs:244` — `use fast_io::landlock::{...}` collapses to a single line under rustfmt 1.88. Left over from PR fix(cli): engage Landlock sandbox on --server receiver entry (UTS-16) #5724's landlock wire-in.
  2. fmt in `crates/transfer/src/generator/filters.rs:589` — `let split = ...` long-form collapses to a single line under rustfmt 1.88.
  3. clippy `filter_map_bool_then` in `crates/transfer/src/generator/file_list/mod.rs:267` — new lint in clippy 1.88. Rewrote `filter_map(|(b, rel)| (b == &entry.base).then(|| rel.clone()))` as the behaviour-identical `filter(...).map(...)` pair.

Test plan

Master CI broke on rustfmt 1.88 and clippy 1.88:

1. `crates/cli/src/frontend/server/run.rs:244` - `use fast_io::landlock::{...}`
   collapses to a single line under rustfmt 1.88 (introduced by PR #5724's
   landlock wire-in).
2. `crates/transfer/src/generator/filters.rs:589` - `let split = ...` long-form
   collapses to single-line under rustfmt 1.88.
3. `crates/transfer/src/generator/file_list/mod.rs:267` - rewrite
   `filter_map(|(b, rel)| (b == &entry.base).then(|| rel.clone()))` as the
   equivalent `filter(...).map(...)` pair so clippy 1.88's new
   `filter_map_bool_then` lint stays clean. Behaviour-identical.

Unblocks PRs #5725, #5726, #5727 once they rebase onto this.
@github-actions github-actions Bot added the chore label Jun 12, 2026
oferchen added 2 commits June 12, 2026 03:50
In .filter(), the destructured 'b' is already &PathBuf since iter() yields
&(PathBuf, PathBuf) and filter receives &Self::Item. The extra deref made it
PathBuf, causing E0277 'can't compare PathBuf with &PathBuf'.
uninlined_format_args lint denies the build under clippy 1.88.
@oferchen
oferchen merged commit 3662b84 into master Jun 12, 2026
54 of 68 checks passed
@oferchen
oferchen deleted the fix/master-fmt-clippy-hygiene branch June 12, 2026 01:38
oferchen added a commit that referenced this pull request Aug 24, 2026
* chore: fix master fmt drift + filter_map_bool_then clippy lint

Master CI broke on rustfmt 1.88 and clippy 1.88:

1. `crates/cli/src/frontend/server/run.rs:244` - `use fast_io::landlock::{...}`
   collapses to a single line under rustfmt 1.88 (introduced by PR #5724's
   landlock wire-in).
2. `crates/transfer/src/generator/filters.rs:589` - `let split = ...` long-form
   collapses to single-line under rustfmt 1.88.
3. `crates/transfer/src/generator/file_list/mod.rs:267` - rewrite
   `filter_map(|(b, rel)| (b == &entry.base).then(|| rel.clone()))` as the
   equivalent `filter(...).map(...)` pair so clippy 1.88's new
   `filter_map_bool_then` lint stays clean. Behaviour-identical.

Unblocks PRs #5725, #5726, #5727 once they rebase onto this.

* fix: drop extraneous deref in filter predicate

In .filter(), the destructured 'b' is already &PathBuf since iter() yields
&(PathBuf, PathBuf) and filter receives &Self::Item. The extra deref made it
PathBuf, causing E0277 'can't compare PathBuf with &PathBuf'.

* chore(cli): inline format args in --partial-dir test (clippy 1.88)

uninlined_format_args lint denies the build under clippy 1.88.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant