diff options
| author | bors <bors@rust-lang.org> | 2023-11-25 11:35:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-11-25 11:35:46 +0000 |
| commit | 3664d6328d12cdb1dc6dd4b226d2c635b7400bcc (patch) | |
| tree | 92573a2e398c5080d9fa5648315e44f08b8ba6aa /tests/rustdoc-js-std/full-path-function.js | |
| parent | fbf13cea16b98fd65487559fb2b82c6cf1207c73 (diff) | |
| parent | ef38969e06127a664ea532e0fd154638b3431ccb (diff) | |
| download | rust-3664d6328d12cdb1dc6dd4b226d2c635b7400bcc.tar.gz rust-3664d6328d12cdb1dc6dd4b226d2c635b7400bcc.zip | |
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`
Diffstat (limited to 'tests/rustdoc-js-std/full-path-function.js')
0 files changed, 0 insertions, 0 deletions
