1 error: this pattern reimplements `Option::unwrap_or`
2 --> $DIR/manual_unwrap_or.rs:6: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:12: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:18: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:25: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:35: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:85:5
63 LL | / match Ok(1) as Result<i32, &str> {
67 | |_____^ help: replace with: `(Ok(1) as Result<i32, &str>).unwrap_or(42)`
69 error: this pattern reimplements `Result::unwrap_or`
70 --> $DIR/manual_unwrap_or.rs:91:5
72 LL | / match Ok(1) as Result<i32, &str> {
76 | |_____^ help: replace with: `(Ok(1) as Result<i32, &str>).unwrap_or(42)`
78 error: this pattern reimplements `Result::unwrap_or`
79 --> $DIR/manual_unwrap_or.rs:97:5
81 LL | / match Ok(1) as Result<i32, &str> {
83 LL | | Err(_) => 1 + 42,
85 | |_____^ help: replace with: `(Ok(1) as Result<i32, &str>).unwrap_or(1 + 42)`
87 error: this pattern reimplements `Result::unwrap_or`
88 --> $DIR/manual_unwrap_or.rs:104:5
90 LL | / match Ok(1) as Result<i32, &str> {
101 LL | (Ok(1) as Result<i32, &str>).unwrap_or({
108 error: this pattern reimplements `Result::unwrap_or`
109 --> $DIR/manual_unwrap_or.rs:114:5
111 LL | / match Ok("Bob") as Result<&str, &str> {
113 LL | | Err(_) => "Alice",
115 | |_____^ help: replace with: `(Ok("Bob") as Result<&str, &str>).unwrap_or("Alice")`
117 error: aborting due to 10 previous errors