Skip to content

Changed modules & visitor mods to public, set filemap::write_file public #980

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

Merged
merged 1 commit into from
May 6, 2016

Conversation

DanielJCampbell
Copy link
Contributor

Changes to improve rustfmt usability as a library - FmtVisitor made public so users can format without having to plug into the main format methods in lib, write file is public to give more control over output filenames/locations, modules is public to allow access to list_files (used to format a file with the visitor).

@@ -80,7 +80,7 @@ pub fn write_system_newlines<T>(writer: T,
}
}

fn write_file<T>(text: &StringBuffer,
pub fn write_file<T>(text: &StringBuffer,
filename: &str,
Copy link
Member

Choose a reason for hiding this comment

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

please adjust the indentation on following lines (surprised this doesn't fail tests)

@nrc
Copy link
Member

nrc commented May 6, 2016

modules is public to allow access to list_files (used to format a file with the visitor)

might it be better to pull this function up rather than making the whole module public?

@DanielJCampbell
Copy link
Contributor Author

@nrc, Currently the only content of that module are that method and two (non-public) helper methods, so the net effect is the same. Just tell me which you'd prefer.

@nrc
Copy link
Member

nrc commented May 6, 2016

Ok, then how it is in the PR seems fine

@nrc nrc merged commit b59b049 into rust-lang:master May 6, 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.

2 participants