1 error: this pattern reimplements `Option::unwrap_or`
2 --> $DIR/manual_unwrap_or.rs:7:5
8 | |_____^ help: replace with: `Some(1).unwrap_or(42)`
10 = note: `-D clippy::manual-unwrap-or` implied by `-D warnings`
12 error: this pattern reimplements `Option::unwrap_or`
13 --> $DIR/manual_unwrap_or.rs:13:5
15 LL | / match Some(1) {
19 | |_____^ help: replace with: `Some(1).unwrap_or(42)`
21 error: this pattern reimplements `Option::unwrap_or`
22 --> $DIR/manual_unwrap_or.rs:19:5
24 LL | / match Some(1) {
26 LL | | None => 1 + 42,
28 | |_____^ help: replace with: `Some(1).unwrap_or(1 + 42)`
30 error: this pattern reimplements `Option::unwrap_or`
31 --> $DIR/manual_unwrap_or.rs:26:5
33 LL | / match Some(1) {
44 LL | Some(1).unwrap_or({
51 error: this pattern reimplements `Option::unwrap_or`
52 --> $DIR/manual_unwrap_or.rs:36:5
54 LL | / match Some("Bob") {
56 LL | | None => "Alice",
58 | |_____^ help: replace with: `Some("Bob").unwrap_or("Alice")`
60 error: this pattern reimplements `Result::unwrap_or`
61 --> $DIR/manual_unwrap_or.rs:86:5
63 LL | / match Ok::<i32, &str>(1) {
67 | |_____^ help: replace with: `Ok::<i32, &str>(1).unwrap_or(42)`
69 error: this pattern reimplements `Result::unwrap_or`
70 --> $DIR/manual_unwrap_or.rs:93:5
76 | |_____^ help: replace with: `a.unwrap_or(42)`
78 error: this pattern reimplements `Result::unwrap_or`
79 --> $DIR/manual_unwrap_or.rs:99:5
81 LL | / match Ok(1) as Result<i32, &str> {
85 | |_____^ help: replace with: `(Ok(1) as Result<i32, &str>).unwrap_or(42)`
87 error: this pattern reimplements `Result::unwrap_or`
88 --> $DIR/manual_unwrap_or.rs:105:5
90 LL | / match Ok::<i32, &str>(1) {
94 | |_____^ help: replace with: `Ok::<i32, &str>(1).unwrap_or(42)`
96 error: this pattern reimplements `Result::unwrap_or`
97 --> $DIR/manual_unwrap_or.rs:111:5
99 LL | / match Ok::<i32, &str>(1) {
101 LL | | Err(_) => 1 + 42,
103 | |_____^ help: replace with: `Ok::<i32, &str>(1).unwrap_or(1 + 42)`
105 error: this pattern reimplements `Result::unwrap_or`
106 --> $DIR/manual_unwrap_or.rs:118:5
108 LL | / match Ok::<i32, &str>(1) {
119 LL | Ok::<i32, &str>(1).unwrap_or({
126 error: this pattern reimplements `Result::unwrap_or`
127 --> $DIR/manual_unwrap_or.rs:128:5
129 LL | / match Ok::<&str, &str>("Bob") {
131 LL | | Err(_) => "Alice",
133 | |_____^ help: replace with: `Ok::<&str, &str>("Bob").unwrap_or("Alice")`
135 error: aborting due to 12 previous errors