rust/clippy_lints
bors ea4c5c5ca5 Auto merge of #11035 - y21:issue10729, r=Jarcho
[`option_if_let_else`]: suggest `.as_ref()` if scrutinee is of type `&Option<_>`

Fixes #10729

`Option::map_or` takes ownership, so if matching on an `&Option<_>`, we need to suggest `.as_ref()` before calling `map_or` to get the same effect and to not cause a borrowck error.

changelog: [`option_if_let_else`]: suggest `.as_ref()`/`.as_mut()` if scrutinee is of type `&Option<_>`/`&mut Option<_>`
2023-06-28 15:39:04 +00:00
..
src Auto merge of #11035 - y21:issue10729, r=Jarcho 2023-06-28 15:39:04 +00:00
Cargo.toml Add lint to check lint formulation messages 2023-06-03 00:00:30 +05:30
README.md

This crate contains Clippy lints. For the main crate, check GitHub.