-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace usages of map_or(bool, ...)
with is_{some_and|none_or|ok_and}
#135732
Conversation
rustbot has assigned @petrochenkov. Use |
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in coverage instrumentation. cc @Zalathar Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri, @rust-lang/wg-const-eval |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not open PRs that apply clippy lints widely to all tools, standard library, and compiler. It makes it difficult to review, since different reviewers should and should not be approving changes to different parts of the compiler. If you'd like to, please split this into separate PRs for compiler/library/tidy.
Feel free to assign me the compiler PR, but for now I'm gonna close this. |
Will do, thanks and sorry for the noise. 🙏 |
…compiler-errors Replace usages of `map_or(bool, ...)` with `is_{some_and|none_or|ok_and}` Split out from rust-lang#135732 according to rust-lang#135732 , same thing but just for the compiler: > The usage of `map_or(bool, ...)` is really hard to understand IMHO. > This PR simply uses clippy (with `--fix`) to replace that with `is_{some_and|none_or|ok_and}`. > (no manual modifications were made, just machine applicable clippy fixes and then fmt) r? `@compiler-errors`
…compiler-errors Replace usages of `map_or(bool, ...)` with `is_{some_and|none_or|ok_and}` Split out from rust-lang#135732 according to rust-lang#135732 , same thing but just for the compiler: > The usage of `map_or(bool, ...)` is really hard to understand IMHO. > This PR simply uses clippy (with `--fix`) to replace that with `is_{some_and|none_or|ok_and}`. > (no manual modifications were made, just machine applicable clippy fixes and then fmt) r? ``@compiler-errors``
Rollup merge of rust-lang#135738 - yotamofek:map_or_true-compiler, r=compiler-errors Replace usages of `map_or(bool, ...)` with `is_{some_and|none_or|ok_and}` Split out from rust-lang#135732 according to rust-lang#135732 , same thing but just for the compiler: > The usage of `map_or(bool, ...)` is really hard to understand IMHO. > This PR simply uses clippy (with `--fix`) to replace that with `is_{some_and|none_or|ok_and}`. > (no manual modifications were made, just machine applicable clippy fixes and then fmt) r? ``@compiler-errors``
The usage of
map_or(bool, ...)
is really hard to understand IMHO.This PR simply uses clippy (with
--fix
) to replace that withis_{some_and|none_or|ok_and}
.(no manual modifications were made, just machine applicable clippy fixes and then fmt)