* Split impl at 'for' if a line break is needed
* Fix formatting
* Improve comments
* Skip second try if there is no 'for'
* Restore intentional trailing whitespace
* Change test source to be incorrectly formatted
* Restore more missing trailing whitespace
* Remove too much whitespace...
Really should learn how to use git revert.
* Change required to prevent a trailing space at the end of a separate module being propagated
* Detect the start of the output file rather than the start of the input file when deciding whether to output preceding snippets - this stops unnecessary whitespace and blank lines from being inserted when spans and statements are output in an order other than that from the input file.
* Add code to prevent space from being added with the prefix snippet if a) the snippet is entirely horizontal whitespace, or b) the snippet contains whitespace followed by a newline. This prevents trailing spaces at the end of a line from being added.
* Tests for this issue
* Tidy up `match` statements
* Add test with blank lines between `use` statements
* Fix issue-1049
* Add testcase suggested by pepyakin
* Fix last commit
* Handle special case
* Remove debugging println
* Fix grammar in comment
* Change word in comment
* Add test for long func without ret type
* Add one more test
* Add multiple configuration file names feature
* Add '.rustfmt.toml' in README file
* Clean up configuration file code
* Make config file names constant
* Use only one blank line
* Add config options for combinations of lines and items
* Reordering of import lines implemented.
* Changed nested matches to tuple pattern matching
* Added ordering of path list items to the ordering of use declarations
* Move `format_imports` and `format_import` methods to `imports.rs`
* Add comment to explain how `use` declarations are split off while walking through a module
* Change `ImportReordering` config option to separate boolean options
* Canonicalize file paths within the map of file line ranges
* Forgot to run the tests - and of course, the formatting of the canonicalization change was off, but it's fixed now!
* Move imports to the top of the file, as per @nrc.
* Change `canonicalize_path_string` to return `Option<String>`, `None` indicating an error rather than an empty string
* `format!` is better than string concatenation...
* Change `canonicalize_path_string` to return `Result` rather than `Option`
This changes rustfmt to return exit code 4
when run with write mode diff and differences between
the formatted code and the original code are found.
Useful for CI to make sure your contributors actually ran rustfmt.