···15151616 # other non-free forms
1717 (map (f: {inherit f;}.double f.val) [ f ])
1818+1919+ # don't reduce on more complex lambda bodies
2020+ (map (x: builtins.div 3 x) xs)
1821]
+4-1
lib/src/lints/eta_reduction.rs
···5656 if let Some(value_node) = body.value();
5757 if let Some(value) = Ident::cast(value_node);
58585959- if arg.as_str() == value.as_str() ;
5959+ if arg.as_str() == value.as_str();
60606161 if let Some(lambda_node) = body.lambda();
6262 if !mentions_ident(&arg, &lambda_node);
6363+ // lambda body should be no more than a single Ident to
6464+ // retain code readability
6565+ if let Some(_) = Ident::cast(lambda_node);
63666467 then {
6568 let at = node.text_range();