-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
option: Use Option::map in Option::cloned #151220
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
Conversation
|
this could be |
Good catch, fixed. |
This comment has been minimized.
This comment has been minimized.
This commit removes a repetitive match statement in favor of Option::map for Option::cloned.
|
LGTM, thanks for the patch @bors r+
For reference, the |
option: Use Option::map in Option::cloned This commit removes a repetitive match statement in favor of Option::map for Option::cloned.
option: Use Option::map in Option::cloned This commit removes a repetitive match statement in favor of Option::map for Option::cloned.
…uwer Rollup of 8 pull requests Successful merges: - #148206 (Deduplicated float tests and unified in floats/mod.rs) - #151042 (fix fallback impl for select_unpredictable intrinsic) - #151220 (option: Use Option::map in Option::cloned) - #151260 (Handle unevaluated ConstKind in in_operand) - #151441 (Fix ICE: Don't try to evaluate type_consts when eagerly collecting items) - #151465 (codegen: clarify some variable names around function calls) - #151469 (llvm: Tolerate dead_on_return attribute changes) - #151476 (Avoid `-> ()` in derived functions.) r? @ghost
…uwer Rollup of 8 pull requests Successful merges: - #148206 (Deduplicated float tests and unified in floats/mod.rs) - #151042 (fix fallback impl for select_unpredictable intrinsic) - #151220 (option: Use Option::map in Option::cloned) - #151260 (Handle unevaluated ConstKind in in_operand) - #151441 (Fix ICE: Don't try to evaluate type_consts when eagerly collecting items) - #151465 (codegen: clarify some variable names around function calls) - #151469 (llvm: Tolerate dead_on_return attribute changes) - #151476 (Avoid `-> ()` in derived functions.) r? @ghost
…uwer Rollup of 8 pull requests Successful merges: - #148206 (Deduplicated float tests and unified in floats/mod.rs) - #151042 (fix fallback impl for select_unpredictable intrinsic) - #151220 (option: Use Option::map in Option::cloned) - #151260 (Handle unevaluated ConstKind in in_operand) - #151441 (Fix ICE: Don't try to evaluate type_consts when eagerly collecting items) - #151465 (codegen: clarify some variable names around function calls) - #151469 (llvm: Tolerate dead_on_return attribute changes) - #151476 (Avoid `-> ()` in derived functions.) r? @ghost
…uwer Rollup of 11 pull requests Successful merges: - #151001 (rustdoc: render doc(hidden) as a code attribute) - #151042 (fix fallback impl for select_unpredictable intrinsic) - #151220 (option: Use Option::map in Option::cloned) - #151260 (Handle unevaluated ConstKind in in_operand) - #151296 (MGCA: Fix incorrect pretty printing of valtree arrays) - #151423 (Move assert_matches to planned stable path) - #151441 (Fix ICE: Don't try to evaluate type_consts when eagerly collecting items) - #151465 (codegen: clarify some variable names around function calls) - #151468 (fix `f16` doctest FIXMEs) - #151469 (llvm: Tolerate dead_on_return attribute changes) - #151476 (Avoid `-> ()` in derived functions.) r? @ghost
|
⌛ Testing commit 85200a4 with merge c94dec2... Workflow: https://github.com/rust-lang/rust/actions/runs/21251749592 |
option: Use Option::map in Option::cloned This commit removes a repetitive match statement in favor of Option::map for Option::cloned.
…uwer Rollup of 11 pull requests Successful merges: - #151001 (rustdoc: render doc(hidden) as a code attribute) - #151042 (fix fallback impl for select_unpredictable intrinsic) - #151220 (option: Use Option::map in Option::cloned) - #151260 (Handle unevaluated ConstKind in in_operand) - #151296 (MGCA: Fix incorrect pretty printing of valtree arrays) - #151423 (Move assert_matches to planned stable path) - #151441 (Fix ICE: Don't try to evaluate type_consts when eagerly collecting items) - #151465 (codegen: clarify some variable names around function calls) - #151468 (fix `f16` doctest FIXMEs) - #151469 (llvm: Tolerate dead_on_return attribute changes) - #151476 (Avoid `-> ()` in derived functions.) r? @ghost
|
@bors retry |
|
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot) |
…uwer Rollup of 11 pull requests Successful merges: - #151001 (rustdoc: render doc(hidden) as a code attribute) - #151042 (fix fallback impl for select_unpredictable intrinsic) - #151220 (option: Use Option::map in Option::cloned) - #151260 (Handle unevaluated ConstKind in in_operand) - #151296 (MGCA: Fix incorrect pretty printing of valtree arrays) - #151423 (Move assert_matches to planned stable path) - #151441 (Fix ICE: Don't try to evaluate type_consts when eagerly collecting items) - #151465 (codegen: clarify some variable names around function calls) - #151468 (fix `f16` doctest FIXMEs) - #151469 (llvm: Tolerate dead_on_return attribute changes) - #151476 (Avoid `-> ()` in derived functions.) r? @ghost
Rollup merge of #151220 - cvengler:map-option, r=tgross35 option: Use Option::map in Option::cloned This commit removes a repetitive match statement in favor of Option::map for Option::cloned.
…uwer Rollup of 11 pull requests Successful merges: - rust-lang/rust#151001 (rustdoc: render doc(hidden) as a code attribute) - rust-lang/rust#151042 (fix fallback impl for select_unpredictable intrinsic) - rust-lang/rust#151220 (option: Use Option::map in Option::cloned) - rust-lang/rust#151260 (Handle unevaluated ConstKind in in_operand) - rust-lang/rust#151296 (MGCA: Fix incorrect pretty printing of valtree arrays) - rust-lang/rust#151423 (Move assert_matches to planned stable path) - rust-lang/rust#151441 (Fix ICE: Don't try to evaluate type_consts when eagerly collecting items) - rust-lang/rust#151465 (codegen: clarify some variable names around function calls) - rust-lang/rust#151468 (fix `f16` doctest FIXMEs) - rust-lang/rust#151469 (llvm: Tolerate dead_on_return attribute changes) - rust-lang/rust#151476 (Avoid `-> ()` in derived functions.) r? @ghost
This commit removes a repetitive match statement in favor of Option::map for Option::cloned.