| error: called `ok().expect()` on a `Result` value |
| --> tests/ui/ok_expect.rs:17:5 |
| | |
| LL | res.ok().expect("disaster!"); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| = note: `-D clippy::ok-expect` implied by `-D warnings` |
| = help: to override `-D warnings` add `#[allow(clippy::ok_expect)]` |
| help: call `expect()` directly on the `Result` |
| | |
| LL - res.ok().expect("disaster!"); |
| LL + res.expect("disaster!"); |
| | |
| |
| error: called `ok().expect()` on a `Result` value |
| --> tests/ui/ok_expect.rs:20:5 |
| | |
| LL | / res.ok() |
| LL | | .expect("longlonglonglonglonglonglonglonglonglonglonglonglonglong"); |
| | |___________________________________________________________________________^ |
| | |
| help: call `expect()` directly on the `Result` |
| | |
| LL - res.ok() |
| LL - .expect("longlonglonglonglonglonglonglonglonglonglonglonglonglong"); |
| LL + res.expect("longlonglonglonglonglonglonglonglonglonglonglonglonglong"); |
| | |
| |
| error: called `ok().expect()` on a `Result` value |
| --> tests/ui/ok_expect.rs:25:5 |
| | |
| LL | / resres |
| LL | | .ok() |
| LL | | .expect("longlonglonglonglonglonglonglonglonglonglonglonglonglong"); |
| | |___________________________________________________________________________^ |
| | |
| help: call `expect()` directly on the `Result` |
| | |
| LL - resres |
| LL - .ok() |
| LL - .expect("longlonglonglonglonglonglonglonglonglonglonglonglonglong"); |
| LL + resres.expect("longlonglonglonglonglonglonglonglonglonglonglonglonglong"); |
| | |
| |
| error: called `ok().expect()` on a `Result` value |
| --> tests/ui/ok_expect.rs:31:5 |
| | |
| LL | / std::process::Command::new("rustc") |
| LL | | .arg("-vV") |
| LL | | .output() |
| LL | | .ok() |
| LL | | .expect("failed to get rustc version"); |
| | |______________________________________________^ |
| | |
| help: call `expect()` directly on the `Result` |
| | |
| LL - .output() |
| LL - .ok() |
| LL - .expect("failed to get rustc version"); |
| LL + .output().expect("failed to get rustc version"); |
| | |
| |
| error: called `ok().expect()` on a `Result` value |
| --> tests/ui/ok_expect.rs:43:5 |
| | |
| LL | res3.ok().expect("whoof"); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| help: call `expect()` directly on the `Result` |
| | |
| LL - res3.ok().expect("whoof"); |
| LL + res3.expect("whoof"); |
| | |
| |
| error: called `ok().expect()` on a `Result` value |
| --> tests/ui/ok_expect.rs:47:5 |
| | |
| LL | res4.ok().expect("argh"); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| help: call `expect()` directly on the `Result` |
| | |
| LL - res4.ok().expect("argh"); |
| LL + res4.expect("argh"); |
| | |
| |
| error: called `ok().expect()` on a `Result` value |
| --> tests/ui/ok_expect.rs:51:5 |
| | |
| LL | res5.ok().expect("oops"); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| help: call `expect()` directly on the `Result` |
| | |
| LL - res5.ok().expect("oops"); |
| LL + res5.expect("oops"); |
| | |
| |
| error: called `ok().expect()` on a `Result` value |
| --> tests/ui/ok_expect.rs:55:5 |
| | |
| LL | res6.ok().expect("meh"); |
| | ^^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| help: call `expect()` directly on the `Result` |
| | |
| LL - res6.ok().expect("meh"); |
| LL + res6.expect("meh"); |
| | |
| |
| error: aborting due to 8 previous errors |
| |