-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed => () to => {} #4226
fixed => () to => {} #4226
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you for the update!
@@ -15,7 +15,7 @@ fn main() { | |||
let y = match (try { | |||
foo()? | |||
}) { | |||
_ => (), | |||
_ => {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this have the ,
at the end while the others and others does not?
@@ -15,7 +15,7 @@ fn main() { | |||
// Test case where first chain element isn't a path, but is shorter than | |||
// the size of a tab. | |||
x() | |||
.y(|| match cond() { true => (), false => () }); | |||
.y(|| match cond() { true => {}, false => {}, }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the extra ,
at the end?
@@ -16,7 +16,7 @@ fn main() { | |||
// Test case where first chain element isn't a path, but is shorter than | |||
// the size of a tab. | |||
x() | |||
.y(|| match cond() { true => (), false => () }); | |||
.y(|| match cond() { true => {} false => {} }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I didn't know this is valid. TIL
Sorry, for making a new pull request but there were alot of new changes in the past day or so to the structure and I didn't want to go through merge conflicts. This fixes issue #4065. It also leaves it so that match_trailing_comma will still have a comma if left to true (this was the change requested on the previous pr)