bors 3664d6328d Auto merge of #11864 - GuillaumeGomez:option_map_or_err_ok, r=flip1995
Create new lint `option_map_or_err_ok`

Fixes #10045.

For the following code:

```rust
let opt = Some(1);
opt.map_or(Err("error"), Ok);
```

It suggests to instead write:

```rust
let opt = Some(1);
opt.ok_or("error");
```

r? `@flip1995`

changelog: Create new lint `option_map_or_err_ok`
2023-11-25 11:35:46 +00:00
..
2023-11-04 21:43:18 +01:00
2023-11-21 22:03:00 +01:00
2023-09-23 13:47:30 +00:00
2023-09-23 13:47:30 +00:00
2023-08-11 14:02:28 +00:00
2023-10-04 21:09:54 +00:00
2023-09-23 13:47:30 +00:00
2023-10-20 21:14:01 +00:00
2023-10-20 21:14:01 +00:00
2023-10-04 21:09:54 +00:00
2023-08-11 14:02:28 +00:00
2023-10-04 21:09:54 +00:00
2023-10-04 21:09:54 +00:00
2023-10-13 21:01:36 +00:00
2023-10-13 21:01:36 +00:00