1 #![warn(clippy::unit_arg)]
7 clippy::unnecessary_wraps,
9 clippy::needless_question_mark
14 fn foo<T: Debug>(t: T) {
18 fn foo3<T1: Debug, T2: Debug, T3: Debug>(t1: T1, t2: T2, t3: T3) {
19 println!("{:?}, {:?}, {:?}", t1, t2, t3);
25 fn bar<T: Debug>(&self, t: T) {
43 taking_multiple_units(foo(0), foo(1));
44 taking_multiple_units(foo(0), {
48 taking_multiple_units(
58 // here Some(foo(2)) isn't the top level statement expression, wrap the suggestion in a block
59 None.or(Some(foo(2)));
60 // in this case, the suggestion can be inlined, no need for a surrounding block
61 // foo(()); foo(()) instead of { foo(()); foo(()) }
69 foo3("a", 3, vec![3]);
76 fn question_mark() -> Result<(), ()> {
84 fn unit_fn() -> Result<(), i32> {
88 fn fallible() -> Result<(), i32> {
94 fn returning_expr() -> Option<()> {
98 fn taking_multiple_units(a: (), b: ()) {}