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 `Option::unwrap_or`
88 --> $DIR/manual_unwrap_or.rs:112:5
90 LL | / match s.method() {
94 | |_____^ help: replace with: `s.method().unwrap_or(42)`
96 error: this pattern reimplements `Result::unwrap_or`
97 --> $DIR/manual_unwrap_or.rs:118:5
99 LL | / match Ok::<i32, &str>(1) {
103 | |_____^ help: replace with: `Ok::<i32, &str>(1).unwrap_or(42)`
105 error: this pattern reimplements `Result::unwrap_or`
106 --> $DIR/manual_unwrap_or.rs:124:5
108 LL | / match Ok::<i32, &str>(1) {
110 LL | | Err(_) => 1 + 42,
112 | |_____^ help: replace with: `Ok::<i32, &str>(1).unwrap_or(1 + 42)`
114 error: this pattern reimplements `Result::unwrap_or`
115 --> $DIR/manual_unwrap_or.rs:131:5
117 LL | / match Ok::<i32, &str>(1) {
128 LL ~ Ok::<i32, &str>(1).unwrap_or({
135 error: this pattern reimplements `Result::unwrap_or`
136 --> $DIR/manual_unwrap_or.rs:141:5
138 LL | / match Ok::<&str, &str>("Bob") {
140 LL | | Err(_) => "Alice",
142 | |_____^ help: replace with: `Ok::<&str, &str>("Bob").unwrap_or("Alice")`
144 error: this pattern reimplements `Option::unwrap_or`
145 --> $DIR/manual_unwrap_or.rs:201:17
147 LL | let _ = match some_macro!() {
149 LL | | Some(val) => val,
152 | |_________^ help: replace with: `some_macro!().unwrap_or(0)`
154 error: aborting due to 14 previous errors