1 error: this function's return value is unnecessarily wrapped by `Option`
2 --> $DIR/unnecessary_wraps.rs:8:1
4 LL | / fn func1(a: bool, b: bool) -> Option<i32> {
6 LL | | return Some(42);
13 = note: `-D clippy::unnecessary-wraps` implied by `-D warnings`
14 help: remove `Option` from the return type...
16 LL | fn func1(a: bool, b: bool) -> i32 {
18 help: ...and change the returning expressions
28 error: this function's return value is unnecessarily wrapped by `Option`
29 --> $DIR/unnecessary_wraps.rs:21:1
31 LL | / fn func2(a: bool, b: bool) -> Option<i32> {
33 LL | | return Some(10);
40 help: remove `Option` from the return type...
42 LL | fn func2(a: bool, b: bool) -> i32 {
44 help: ...and change the returning expressions
54 error: this function's return value is unnecessarily wrapped by `Option`
55 --> $DIR/unnecessary_wraps.rs:51:1
57 LL | / fn func5() -> Option<i32> {
62 help: remove `Option` from the return type...
64 LL | fn func5() -> i32 {
66 help: ...and change the returning expressions
71 error: this function's return value is unnecessarily wrapped by `Result`
72 --> $DIR/unnecessary_wraps.rs:61:1
74 LL | / fn func7() -> Result<i32, ()> {
79 help: remove `Result` from the return type...
81 LL | fn func7() -> i32 {
83 help: ...and change the returning expressions
88 error: this function's return value is unnecessarily wrapped by `Option`
89 --> $DIR/unnecessary_wraps.rs:93:5
91 LL | / fn func12() -> Option<i32> {
96 help: remove `Option` from the return type...
98 LL | fn func12() -> i32 {
100 help: ...and change the returning expressions
105 error: aborting due to 5 previous errors