topecongiro
9537437e52
Use is_empty_block()
2017-09-29 12:51:06 +09:00
topecongiro
d8fc9ec05e
Remove has_braces from argument
2017-09-29 12:50:35 +09:00
topecongiro
2e6825cc8c
Use FnSig in rewrite_fn() and rewrite_fn_base()
2017-09-29 12:49:39 +09:00
topecongiro
7d448c2b26
Implement FnSig type
2017-09-29 12:45:42 +09:00
topecongiro
b751030640
Remove unnecessary wrap_str()
2017-09-19 11:40:20 +09:00
Seiichi Uchida
32fa51a6a9
Move Spanned to spanned.rs from lib.rs
2017-09-19 10:04:35 +09:00
Seiichi Uchida
df7d2be562
Move Indent and Shape to shape.rs from lib.rs
2017-09-19 10:04:35 +09:00
Seiichi Uchida
18cd19673d
Remove wrap_str() from recover_comment_removed()
...
since we will be using the original snippet no matter what.
2017-09-18 23:30:59 +09:00
Nick Cameron
cccb7f681e
Merge pull request #1966 from topecongiro/string-to-cow
...
Refactoring: use Cow and etc.
2017-09-18 12:45:25 +12:00
topecongiro
0b5d524486
Remove unnecessary references
2017-09-15 17:09:30 +09:00
topecongiro
f51261e93e
Cargo fmt
2017-09-15 12:10:58 +09:00
Seiichi Uchida
e6e696f7b0
Avoid cloning String
2017-09-05 01:04:08 +09:00
Nick Cameron
d08405eed6
Merge pull request #1931 from topecongiro/cargo-clippy
...
Apply refactoring from cargo clippy
2017-08-31 17:18:45 +12:00
Seiichi Uchida
4b79055a15
Apply refactoring from cargo clippy
2017-08-31 12:49:12 +09:00
topecongiro
4ad81d0bd9
Refactoring: use context.budget()
2017-08-31 12:44:40 +09:00
topecongiro
16894b9cd2
Put the closing brace of empty enum on the same line with the opening brace
2017-08-31 12:44:40 +09:00
Nick Cameron
39a91ba292
Fixup warnings and test formatting
2017-08-31 14:20:47 +12:00
Vadim Petrochenkov
6e5c6f5ba3
Use getters to access Span
fields
2017-08-31 14:14:13 +12:00
topecongiro
979d131c5d
Format and preserve attributes on ast::Stmt
2017-08-30 19:27:36 +09:00
topecongiro
e31a48b4d9
Refactoring: remove duplicates
2017-08-30 19:26:45 +09:00
Nick Cameron
7298ce9d52
Merge pull request #1925 from topecongiro/enhance-comment
...
Enhance comment formatting
2017-08-28 09:33:08 +12:00
topecongiro
1015dd8860
Use String::with_capacity() instead of String::new()
2017-08-28 00:24:10 +09:00
topecongiro
c4c55285da
Recover comments between 'trait' and the opening brace
2017-08-28 00:17:19 +09:00
topecongiro
fa7c4d5030
Recover comments between 'impl' and the opening brace
2017-08-28 00:16:54 +09:00
topecongiro
6bbc6b54de
Refactor - remove duplicates
...
replacing some functions with recover_missing_comments() and
rewrite_missing_comments().
2017-08-28 00:13:42 +09:00
topecongiro
ef84319e47
Fix a typo in calculating overhead for fn args
2017-08-27 14:57:21 +09:00
topecongiro
1f9e7c25c9
Implement Rewrite trait for ast::ForeignItem
2017-08-25 08:19:51 +09:00
Nick Cameron
7e171836c6
Merge pull request #1900 from spinda/attributes-on-same-line
...
Add attributes_on_same_line_as_{field,variant} configs
2017-08-21 11:26:36 +12:00
Nick Cameron
88cb142173
Merge pull request #1895 from topecongiro/configs-match_pattern_separator_break_point
...
Add mach_pattern_separator_break_point config option
2017-08-21 09:30:34 +12:00
Michael Smith
baafa4f011
Fix wrapping of bounds in associated types
...
Bounds were wrapped to the full width of the line rather then the width
available after the "type ...: ", resulting in rustfmt unnecessarily producing
lines that were longer than the maximum width.
2017-08-19 15:30:53 -07:00
Michael Smith
1c9d044c05
Add attributes_on_same_line_as_{field,variant}
2017-08-19 15:09:10 -07:00
Seiichi Uchida
63ac49638b
Support match_pattern_separator_break_point config option
2017-08-18 23:19:47 +09:00
topecongiro
a4e0fe2b02
Allow attributes to stay on the same line with fields
2017-08-11 17:52:49 +09:00
topecongiro
0bb998685d
Cover comments between function args and the brace
2017-08-10 23:11:18 +09:00
topecongiro
be38606c77
Add leave_last field to ListItems
2017-08-09 16:37:21 +09:00
Seiichi Uchida
a5a7cc7643
Insert newline between type alias with where clause
2017-08-02 23:27:33 +09:00
Seiichi Uchida
c0c27761b4
Simplify comments separator
2017-08-02 23:27:19 +09:00
Seiichi Uchida
d955497751
Factor out boolean flags for rewrite_where_clause()
2017-08-02 23:26:35 +09:00
Nick Cameron
9ae00a4498
Merge pull request #1847 from topecongiro/issue-1843
...
Implement single-line where
2017-08-02 14:28:48 +12:00
Seiichi Uchida
659d325982
Implement compressed where clause with Rfc style
2017-08-01 22:27:12 +09:00
Seiichi Uchida
ec6c2d6e99
Refactor compute_budgets_for_args()
2017-08-01 22:27:12 +09:00
Seiichi Uchida
c67f729205
Refactoring
2017-08-01 22:27:12 +09:00
topecongiro
e636fe732e
Use Span from ast::WhereClause
2017-08-01 18:36:36 +09:00
Nick Cameron
c283d3e643
Merge pull request #1840 from topecongiro/match-with-max-width
...
Match with max width
2017-08-01 13:51:23 +12:00
Seiichi Uchida
e588f2fd7b
Make definitive_tactic more generic via enum Separator
2017-07-31 16:23:42 +09:00
Seiichi Uchida
570a3505b9
Make definitive_tactic more generic with separator length
2017-07-29 22:13:23 +09:00
topecongiro
5aff5beb2a
More fine-grained file-lines
2017-07-29 16:11:36 +09:00
Nick Cameron
74f5a515ef
Merge pull request #1831 from topecongiro/trait-associated-type-with-default
...
Fix a typo in rewrite_associated_type
2017-07-29 12:31:36 +12:00
Nick Cameron
19bd5ea7b3
Merge pull request #1826 from topecongiro/issue-1824
...
Use correct BytePos for where when rewriting trait
2017-07-29 12:11:17 +12:00
topecongiro
462530cb7e
Fix a typo in rewrite_associated_type
2017-07-28 06:27:34 +09:00