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

Always skip children when using Plain write mode #966

Merged

Conversation

MicahChalmer
Copy link
Contributor

Outputting child module contents in the "Plain" write mode does not make sense, since there is no way to differentiate code that came from a child module from that which came from the parent file.

Fixes #939. If this is merged, integrations that want to run a single file can send it on stdin and need not specify any flags--the output will contain only the reformatted code that was input.

Outputting child module contents in the "Plain" write mode does not make
sense, since there is no way to differentiate code that came from a
child module from that which came from the parent file.
@nrc
Copy link
Member

nrc commented Apr 28, 2016

Looks good, thanks!

@nrc nrc merged commit 5092eec into rust-lang:master Apr 28, 2016
@lhecker
Copy link

lhecker commented May 6, 2016

@nrc would it be possible for you to release a v0.4.2 or something? I modified the very widely used atom-beautify extension today to use this new change and it works not just faster but als much better, but it depends on this PR. For instance it finally fixes the problem that it didn't work on lib.rs and mod.rs files because it couldn't find the files behind the mod foobar; declarations. So pushing a new version right now might possibly really benefit a lot of Rust users. 😊

@nrc
Copy link
Member

nrc commented May 8, 2016

@lhecker I'm planning on doing a 0.5 release soon, just waiting for a PR to land, should happen in the next few days. Is that soon enough?

@lhecker
Copy link

lhecker commented May 8, 2016

Yeah of course! I'll submit a PR for a rustfmt 0.5 to atom-beautify and let it merge as soon as you published the new version.

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.

None yet

3 participants