Skip to content

chore: clippy::unnecessary_wraps#10722

Merged
sylvestre merged 2 commits intouutils:mainfrom
nyurik:unnecessary_wraps
Feb 5, 2026
Merged

chore: clippy::unnecessary_wraps#10722
sylvestre merged 2 commits intouutils:mainfrom
nyurik:unnecessary_wraps

Conversation

@nyurik
Copy link
Copy Markdown
Contributor

@nyurik nyurik commented Feb 4, 2026

Returning Option or Result when they are not needed leads to incorrect assumptions and extra error code where none is needed. This PR removed a few cases like that.

@nyurik nyurik force-pushed the unnecessary_wraps branch 2 times, most recently from e1af275 to 2e6990e Compare February 5, 2026 03:31
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 5, 2026

GNU testsuite comparison:

Congrats! The gnu test tests/printf/printf-surprise is now passing!

* [`clippy::unnecessary_wraps`](https://rust-lang.github.io/rust-clippy/master/index.html?search=wildcard_imports#wildcard_imports)

Returning Option or Result when they are not needed leads to incorrect assumptions and extra error code where none is needed. This PR removed a few cases like that.
@nyurik nyurik force-pushed the unnecessary_wraps branch from 2e6990e to 7b78134 Compare February 5, 2026 03:44
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 5, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)

}

#[cfg(not(windows))]
#[expect(clippy::unnecessary_wraps)] // To match all platforms
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.

could use reason attribute, like:

#[expect(clippy::some_lint, reason = "False positive rust-lang/rust-clippy#1002020")]

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.

thx, good idea, fixed

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 5, 2026

GNU testsuite comparison:

Congrats! The gnu test tests/printf/printf-surprise is now passing!

@sylvestre sylvestre merged commit eef93af into uutils:main Feb 5, 2026
154 of 156 checks passed
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