`rustfmt` leaves an extra space after `self` in function signature
impl Foo {
fn foo(
&self,
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: i32,
) -> Self {
Self
}
}
should be formatted into
impl Foo {
fn foo(
&self,
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: i32,
) -> Self {
Self
}
}
I think this issue is related to #245. Does anyone know whether the extra blank line is expected or not in the default setting of rustfmt?
@rustbot claim
In my humble opinion, it is expected to have a blank line. If we do not have a blank line, it may also remove the comment in between the lines. Also, if we have more than 1 line, Rustfmt is correctly reducing it to one blank line.
Also, it might be helpful to have a blank line in between the parameters sometimes to enhance the readability of the code.
@raheja15 It's my expectation that the blank line would be removed. Could you elaborate on your explanation with some example code snippets. Are you saying that you tried to make code changes that resulted in incorrect formatting for other code snippets?