Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 11435c5

Browse files
committed
Don't insert a new line when fn has no return type
1 parent 2f03a31 commit 11435c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ where
400400
shape.block().indent.to_string_with_newline(context.config),
401401
)
402402
};
403-
if last_line_width(&args) + first_line_width(&output) <= shape.width {
403+
if output.is_empty() || last_line_width(&args) + first_line_width(&output) <= shape.width {
404404
Some(format!("{}{}", args, output))
405405
} else {
406406
Some(format!(

0 commit comments

Comments
 (0)