rustfmt_nightly::chains

Function should_add_parens

Source
fn should_add_parens(expr: &Expr) -> bool
Expand description

Whether a method call’s receiver needs parenthesis, like

|| .. .method();
|| 1.. .method();
1. .method();

Which all need parenthesis or a space before .method().