Skip to content

Style: move some Option if/else to method chains - #12285

Merged
WindSoilder merged 3 commits into
nushell:mainfrom
sholderbach:clippy-unchained
Mar 26, 2024
Merged

WindSoilder merged 3 commits into
nushell:mainfrom
sholderbach:clippy-unchained

Conversation

@sholderbach

Copy link
Copy Markdown
Member
  • Use bool::then where it simplifies readability
  • More debatable uses of bool::then
  • Use Option::filter in find_active_overlay

@WindSoilder WindSoilder left a comment

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.

Oh, bool::then, I remember we have added it before, but we revert it back because of rust-toolchain.
Happy to see it back!

@WindSoilder
WindSoilder merged commit b2c5dc2 into nushell:main Mar 26, 2024
@hustcer hustcer added this to the v0.92.0 milestone Mar 26, 2024
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