if line.is_empty() {
continue;
}
+ } else if is_prev_line_multi_line && !line.is_empty() {
+ result.push(' ')
} else {
- if is_prev_line_multi_line && !line.is_empty() {
- result.push(' ')
- } else {
- result.push_str(&comment_line_separator);
- }
+ result.push_str(&comment_line_separator);
}
if config.wrap_comments() && line.len() > fmt.shape.width && !has_url(line) {
let (mut result, force_newline_brace) =
rewrite_fn_base(&context, indent, ident, fn_sig, span, newline_brace, true)?;
- if self.config.fn_brace_style() == BraceStyle::AlwaysNextLine || force_newline_brace {
- newline_brace = true;
- } else if last_line_width(&result) + 2 > self.shape().width {
- // 2 = ` {`
+ // 2 = ` {`
+ if self.config.fn_brace_style() == BraceStyle::AlwaysNextLine || force_newline_brace
+ || last_line_width(&result) + 2 > self.shape().width
+ {
newline_brace = true;
} else if !result.contains('\n') {
newline_brace = false;