error: this function returns unnecessarily wrapping data --> $DIR/unnecessary_wrap.rs:8:1 | LL | / fn func1(a: bool, b: bool) -> Option { LL | | if a && b { LL | | return Some(42); LL | | } ... | LL | | } LL | | } | |_^ | = note: `-D clippy::unnecessary-wrap` implied by `-D warnings` help: remove `Option` from the return type... | LL | fn func1(a: bool, b: bool) -> i32 { | ^^^ help: ...and change the returning expressions | LL | return 42; LL | } LL | if a { LL | Some(-1); LL | 2 LL | } else { ... error: this function returns unnecessarily wrapping data --> $DIR/unnecessary_wrap.rs:39:1 | LL | / fn func4() -> Option { LL | | Some(1) LL | | } | |_^ | help: remove `Option` from the return type... | LL | fn func4() -> i32 { | ^^^ help: ...and change the returning expressions | LL | 1 | error: this function returns unnecessarily wrapping data --> $DIR/unnecessary_wrap.rs:49:1 | LL | / fn func6() -> Result { LL | | Ok(1) LL | | } | |_^ | help: remove `Result` from the return type... | LL | fn func6() -> i32 { | ^^^ help: ...and change the returning expressions | LL | 1 | error: aborting due to 3 previous errors