Skip to content

ls: Changed unwrap_or and or option handling to lazy evaluated unwrap_or_else and or_else#6609

Merged
cakebaker merged 2 commits intouutils:mainfrom
AnirbanHalder654322:lazy_evaluation_in_ls
Sep 7, 2024
Merged

ls: Changed unwrap_or and or option handling to lazy evaluated unwrap_or_else and or_else#6609
cakebaker merged 2 commits intouutils:mainfrom
AnirbanHalder654322:lazy_evaluation_in_ls

Conversation

@AnirbanHalder654322
Copy link
Contributor

This would help us reduce a lstat() call on ls/colors.rs

@sylvestre
Copy link
Contributor

Nice. How did you detect this?

@github-actions
Copy link

github-actions bot commented Aug 2, 2024

GNU testsuite comparison:

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

@AnirbanHalder654322
Copy link
Contributor Author

Nice. How did you detect this?

Actually i worked on that part of the code in an old pr, few months back. So i remembered that it was using or instead of or_else there.

@github-actions
Copy link

github-actions bot commented Aug 2, 2024

GNU testsuite comparison:

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

@cakebaker cakebaker merged commit e474938 into uutils:main Sep 7, 2024
@cakebaker
Copy link
Contributor

Thanks!

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