1 #![warn(clippy::unnecessary_wraps)]
2 #![allow(clippy::no_effect)]
3 #![allow(clippy::needless_return)]
4 #![allow(clippy::if_same_then_else)]
8 fn func1(a: bool, b: bool) -> Option<i32> {
21 fn func2(a: bool, b: bool) -> Option<i32> {
32 // public fns should not be linted
33 pub fn func3(a: bool) -> Option<i32> {
41 // should not be linted
42 fn func4(a: bool) -> Option<i32> {
51 fn func5() -> Option<i32> {
55 // should not be linted
56 fn func6() -> Option<i32> {
61 fn func7() -> Result<i32, ()> {
65 // should not be linted
66 fn func8(a: bool) -> Result<i32, ()> {
74 // should not be linted
75 fn func9(a: bool) -> Result<i32, ()> {
79 // should not be linted
80 fn func10() -> Option<()> {
87 // should not be linted
88 pub fn func11() -> Option<i32> {
93 fn func12() -> Option<i32> {
99 // trait impls are not linted
100 fn func13() -> Option<i32> {
106 // trait impls are not linted
107 fn func13() -> Option<i32> {
112 fn issue_6384(s: &str) -> Option<&str> {
120 // method calls are not linted