about summary refs log tree commit diff
path: root/src/string.rs
AgeCommit message (Collapse)AuthorLines
2019-02-19Various cosmetic improvements (#3403)Alexander Regueiro-12/+2
2019-02-04transition to Rust 2018Evgenii-5/+5
2019-01-15Use Unicode-standard char width to wrap comments or strings. (#3275)wada314-26/+44
2018-12-25Fix issue #3263 (#3264)wada314-6/+7
2018-12-18Fix trim_right/trim_left deprecation warnings (#3252)Philipp Hansch-6/+6
2018-10-19fix a few typos found via codespell.Matthias Krüger-2/+2
2018-10-16Merge pull request #3106 from sinkuu/clippyNick Cameron-21/+9
Clippy and cleanups
2018-10-16Merge pull request #3101 from nrc/pair-newlineNick Cameron-5/+6
Simplify multi-lining binop exprs
2018-10-15Use concat() instead of join("")Shotaro Yamada-20/+8
2018-10-15CleanupShotaro Yamada-2/+2
2018-10-15try to fix comment bad wrapping (#3099)Daniele D'Orazio-17/+21
2018-10-15Fixup formattingNick Cameron-5/+6
2018-10-09rewrite_string: detect when a url is being split and place the new lineStéphane Campinas-2/+75
after it
2018-10-08rewrite_string: allow to break on a boundary character that is on edgeStéphane Campinas-19/+70
2018-10-08rewrite_string: retain blank lines that are trailingStéphane Campinas-30/+65
2018-10-08rewrite_string: take care of blank lines appearing within the last lineStéphane Campinas-2/+45
2018-10-08rewrite_string: handle newlines in the last line that fits in the shape for ↵Stéphane Campinas-13/+51
cases where line_start is not a whitespace
2018-10-08rewrite_string: do not overflow the next line when the line_start is not a ↵Stéphane Campinas-15/+75
whitespace
2018-10-08rewrite_string: trim trailing whitespace in case the last_line fits in the ↵Stéphane Campinas-1/+21
given shape
2018-10-02format_strings: take into account newline occurring within a rewritten lineStéphane Campinas-3/+48
2018-07-14removed unused max_width argument of rewrite_string functionStéphane Campinas-7/+3
2018-07-14fix rewrite_string when a line feed is present in a sequence of whitespaces, ↵Stéphane Campinas-72/+224
resulting in strange formatting
2018-07-12Fixup formatting of tests and sourceNick Cameron-1/+2
2018-05-24Seperate and optimize grapheme conditionsPazzaz-6/+16
2018-05-24Avoid unnecessary comparisons with cur_endPazzaz-2/+2
2018-03-02Go back to a non-workspace structureNick Cameron-0/+162
Kinda reverts https://github.com/rust-lang-nursery/rustfmt/pull/2419
2018-02-07Create rustfmt_core cratetopecongiro-163/+0
2018-01-22Cargo fmtSeiichi Uchida-2/+2
2017-10-31Add an optional max width argument to rewrite_string()topecongiro-3/+11
2017-10-31Use visual indent only when rewriting string literaltopecongiro-1/+1
2017-10-18Cargo fmttopecongiro-1/+3
2017-10-05Replace 'try_opt!' macro with a '?' operatortopecongiro-1/+1
2017-10-01Implement StringFormat::new()topecongiro-10/+15
2017-09-19Move Indent and Shape to shape.rs from lib.rsSeiichi Uchida-2/+3
2017-09-15Cargo fmttopecongiro-2/+2
2017-07-20Format source codes and update testsSeiichi Uchida-1/+1
2017-07-13Sort imports in alphabetical and consistent ordertopecongiro-3/+3
2017-06-16Format source codestopecongiro-4/+6
2017-06-14Format source codestopecongiro-1/+1
2017-06-13RebasingNick Cameron-6/+4
2017-06-13Reformat source code using new defaultsNick Cameron-5/+8
2017-05-25Format source codestopecongiro-2/+1
2017-05-24Format source codestopecongiro-1/+2
2017-05-16Switch to accessing config items via method.Michael Killough-1/+1
Preparation for #865, which proposes adding a flag which outputs which config options are used during formatting. This PR should not make any difference to functionality. A lot of this was search-and-replace. Some areas worthy of review/discussion: - The method for each config item returns a clone of the underlying value. We can't simply return an immutable reference, as lots of places in the code expect to be able to pass the returned value as `bool` (not `&bool). It would be nice if the `bool` items could return a copy, but the more complex types a borrowed reference... but unfortunately, I couldn't get the macro to do this. - A few places (mostly tests and `src/bin/rustfmt.rs`) were overriding config items by modifying the fields of the `Config` struct directly. They now use the existing `override_value()` method, which has been modified to return a `Result` for use by `src/bin/rustfmt.rs`. This benefits of this are that the complex `file_lines` and `write_mode` strings are now parsed in one place (`Config.override_value`) instead of multiple. The disadvantages are that it moves the compile-time checks for config names to become run-time checks.
2017-05-03Format source codestopecongiro-4/+1
2017-03-28fallout - source reformattingNick Cameron-1/+4
2017-03-28Source formatting falloutNick Cameron-1/+2
2017-02-26bump regex to 0.2Igor Gnatenko-1/+1
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-02-23FalloutNick Cameron-2/+2
2017-02-21WIPNick Cameron-2/+3