[go: up one dir, main page]

Skip to content
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

Do not trim a block from expression if its condition will go multi-line #3042

Merged
merged 2 commits into from
Sep 21, 2018

Conversation

topecongiro
Copy link
Contributor

Closes #3040.

N.B. this PR does not handle adding a block to an arm body. E.g. the following snippet will not get formatted.

            DevtoolScriptControlMsg::WantsLiveNotifications(id, to_send) => match documents
                .find_window(id)
            {
                Some(window) => {
                    devtools::handle_wants_live_notifications(window.upcast(), to_send)
                }
                None => return warn!("Message sent to closed pipeline {}.", id),
            },

IMHO adding/removing a block around match arm's body has been buggish and has confused users, so I think we should review and refactor its logic.

@nrc nrc merged commit 4568c1a into rust-lang:master Sep 21, 2018
@nrc
Copy link
Member
nrc commented Sep 21, 2018

Thank you!

@topecongiro topecongiro deleted the issue-3040 branch July 21, 2019 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect indentation for match expression in match arm
2 participants