Skip to content

cut: use ? instead of match#11461

Merged
sylvestre merged 1 commit intouutils:mainfrom
cakebaker:cut_replace_match
Mar 23, 2026
Merged

cut: use ? instead of match#11461
sylvestre merged 1 commit intouutils:mainfrom
cakebaker:cut_replace_match

Conversation

@cakebaker
Copy link
Copy Markdown
Contributor

This PR uses ? instead of match in three places where the None arm returns None.

@xtqqczze
Copy link
Copy Markdown
Contributor

xtqqczze commented Mar 23, 2026

I guess this is a false negative for clippy::question_mark.

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/pr/bounded-memory (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/basenc/bounded-memory is now passing!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 23, 2026

Merging this PR will improve performance by 5.6%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 2 improved benchmarks
✅ 298 untouched benchmarks
⏩ 46 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation cut_fields_tab 26.8 ms 25.4 ms +5.46%
Simulation cut_fields_custom_delim 30.9 ms 29.3 ms +5.6%

Comparing cakebaker:cut_replace_match (edf71d9) with main (c6a57bb)

Open in CodSpeed

Footnotes

  1. 46 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.

@sylvestre
Copy link
Copy Markdown
Contributor

terrific

@sylvestre sylvestre merged commit b0b3ac2 into uutils:main Mar 23, 2026
177 of 178 checks passed
@cakebaker cakebaker deleted the cut_replace_match branch March 23, 2026 12:28
@cakebaker
Copy link
Copy Markdown
Contributor Author

@xtqqczze thanks for the hint, I opened an issue there: rust-lang/rust-clippy#16751

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