Skip to content

true, false: reduce num of vars#11448

Closed
oech3 wants to merge 1 commit intouutils:mainfrom
oech3:trueerr
Closed

true, false: reduce num of vars#11448
oech3 wants to merge 1 commit intouutils:mainfrom
oech3:trueerr

Conversation

@oech3
Copy link
Contributor

@oech3 oech3 commented Mar 22, 2026

No description provided.

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/pr/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/unexpand/bounded-memory is now being skipped but was previously passing.
Congrats! The gnu test tests/rm/many-dir-entries-vs-OOM is now passing!

@oech3 oech3 marked this pull request as ready for review March 22, 2026 07:00
@xtqqczze
Copy link
Contributor

What is the motivation for this change?

@oech3
Copy link
Contributor Author

oech3 commented Mar 22, 2026

Just reduce a var mostly having same meaning.

@xtqqczze
Copy link
Contributor

I think the nested inline if is less readable.


if let Err(print_fail) = error
&& print_fail.kind() != std::io::ErrorKind::BrokenPipe
}) && e.kind() != std::io::ErrorKind::BrokenPipe
Copy link
Contributor

Choose a reason for hiding this comment

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

i don't think it is better


if let Err(print_fail) = error
&& print_fail.kind() != std::io::ErrorKind::BrokenPipe
}) && e.kind() != std::io::ErrorKind::BrokenPipe
Copy link
Contributor

Choose a reason for hiding this comment

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

same, i don't like this

@oech3 oech3 closed this Mar 22, 2026
@oech3 oech3 deleted the trueerr branch March 22, 2026 16:56
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