fn same_line_else_kw_and_brace(
init_str: &str,
context: &RewriteContext<'_>,
else_kw_span: Span,
init_shape: Shape,
) -> bool
Expand description
When the initializer expression is multi-lined, then the else keyword and opening brace of the block ( i.e. “else {”) should be put on the same line as the end of the initializer expression if all the following are true:
- The initializer expression ends with one or more closing parentheses, square brackets, or braces
- There is nothing else on that line
- That line is not indented beyond the indent on the first line of the let keyword