Skip to content

chore: fix clippy issues in rust v1.99 - #15022

Open
eduardomourar wants to merge 1 commit into
uutils:mainfrom
eduardomourar:chore/fix-clippy-issues
Open

eduardomourar wants to merge 1 commit into
uutils:mainfrom
eduardomourar:chore/fix-clippy-issues

Conversation

@eduardomourar

@eduardomourar eduardomourar commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #14916

Resolves clippy lints surfaced by the stable toolchain update: redundant closures around map_err, merged cfg(not(any(...))) attributes, and is_empty/assert! replaced with assert_eq!/assert_ne! where clippy preferred it.

No functional changes.

@eduardomourar
eduardomourar force-pushed the chore/fix-clippy-issues branch from c7482ae to f883c9c Compare October 1, 2026 20:35
@codspeed

codspeed Bot commented Oct 1, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 13.36%

❌ 3 regressed benchmarks
✅ 390 untouched benchmarks
⏩ 54 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Simulation three_39_bit_primes 533 ms 710 ms -24.93%
❌ Simulation five_38_bit_primes 1.8 s 1.9 s -7.89%
❌ Simulation thirteen_39_bit_primes 8.9 s 9.5 s -5.93%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing eduardomourar:chore/fix-clippy-issues (f883c9c) with main (2b85f6f)

Open in CodSpeed

Footnotes

  1. 54 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Congrats! The gnu test tests/id/setgid is no longer failing!

Comment thread src/uu/chmod/src/chmod.rs
let (c, a, i) = extract_negative_modes(["--", "-r", "file"].iter().map(OsString::from));
assert_eq!(c, None);
assert_eq!(a, ["--", "-r", "file"]);
assert!(i.is_empty());

@oech3 oech3 Oct 2, 2026 •

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.

I like previous one. Can we disable the clippy?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Me too. We can disable a particular clippy rule globally, but you would not have consistency (as both mechanisms would be allowed). My suggestion is to follow the default config from clippy in this case assert_is_empty.

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.

disabled at #15026

@xtqqczze

xtqqczze commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

@eduardomourar The clippy errors should now have been addressed, and assert_is_empty already has a PR: #14472, so is there anything left for this PR to address?

@eduardomourar

eduardomourar commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

If I ignore the assert_is_empty part, those clippy issues are still resolved in this PR:

  • redundant closures around map_err
  • merged cfg(not(any(...))) attributes

@xtqqczze

xtqqczze commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

I'm not aware of any Clippy issues failing the build.

@xtqqczze

xtqqczze commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

@eduardomourar In general, please use separate commits per lint for this type of PR.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix Rust 1.99 lints

3 participants