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

unify format_string and format_file #921

Merged
merged 1 commit into from
Apr 11, 2016
Merged

Conversation

matklad
Copy link
Member

@matklad matklad commented Apr 11, 2016

One more refactoring :)

@@ -189,6 +189,8 @@ fn execute() -> i32 {
// write_mode is always Plain for Stdin.
config.write_mode = WriteMode::Plain;

config.skip_children = true;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a wishful thinking. At the moment if you format text from stdin, and it contains mod foo;, you get a panic from a parser.

@marcusklaas
Copy link
Contributor

This looks good to me. Since @nrc is reviewing another IO PR and these may potentially conflict, I'll leave the final review to him.

@matklad
Copy link
Member Author

matklad commented Apr 11, 2016

Good to know! I've remove the source of potential conflict. It was a sort of dead code anyway.

@nrc nrc merged commit 09440b5 into rust-lang:master Apr 11, 2016
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.

3 participants