1 #![warn(clippy::unit_arg)]
7 clippy::unnecessary_wrap,
13 fn foo<T: Debug>(t: T) {
17 fn foo3<T1: Debug, T2: Debug, T3: Debug>(t1: T1, t2: T2, t3: T3) {
18 println!("{:?}, {:?}, {:?}", t1, t2, t3);
24 fn bar<T: Debug>(&self, t: T) {
42 taking_multiple_units(foo(0), foo(1));
43 taking_multiple_units(foo(0), {
47 taking_multiple_units(
57 // here Some(foo(2)) isn't the top level statement expression, wrap the suggestion in a block
58 None.or(Some(foo(2)));
59 // in this case, the suggestion can be inlined, no need for a surrounding block
60 // foo(()); foo(()) instead of { foo(()); foo(()) }
68 foo3("a", 3, vec![3]);
75 fn question_mark() -> Result<(), ()> {
83 fn unit_fn() -> Result<(), i32> {
87 fn fallible() -> Result<(), i32> {
93 fn returning_expr() -> Option<()> {
97 fn taking_multiple_units(a: (), b: ()) {}