topecongiro
d4bf413956
Do not add missing snippet between arms if it's just spaces
2017-08-05 15:23:23 +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
568a9adf87
Avoid early line breaks in match condition
2017-07-31 16:24:07 +09: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
1f991d00e0
Merge pull request #1822 from topecongiro/issue-1172
...
Remove newlines between list elements for expressions
2017-07-27 11:15:53 +12:00
Seiichi Uchida
261865ecc9
Remove newlines between list elements for expressions
2017-07-26 22:43:36 +09:00
topecongiro
38614e7af1
Format source codes and update tests
2017-07-26 17:43:17 +09:00
topecongiro
6b8f62fcc8
Avoid regression
2017-07-26 17:42:52 +09:00
topecongiro
760d6b85e2
Ignore the last line overhead when rewriting condition
2017-07-26 17:41:45 +09:00
topecongiro
2ffe4d0563
Simplify rewrite_pair
2017-07-26 17:40:57 +09:00
topecongiro
e523f053a3
Format source codes and update tests
2017-07-26 16:30:58 +09:00
topecongiro
3884b532b9
Avoid unnecessary line breaks in condition expression
2017-07-26 16:28:55 +09:00
Seiichi Uchida
8b970fcc9f
Format inner attributes wherever possible
2017-07-25 00:55:55 +09:00
topecongiro
68c6fe70fd
Format source codes and update tests
2017-07-21 17:57:31 +09:00
topecongiro
a16307a70f
Allow block-like rhs expression to stay on the same line as lhs
2017-07-21 17:57:31 +09:00
topecongiro
b233653a22
Cover missing comments between attributes and expressions
2017-07-20 23:58:00 +09:00
Seiichi Uchida
a8b0a6e4c5
Format source codes and update tests
2017-07-20 00:42:00 +09:00
Seiichi Uchida
28e32ce898
Use block indent when rewriting parenthesised expressions
2017-07-20 00:42:00 +09:00
Seiichi Uchida
faf45b3a80
Remove old heuristics from legacy style
2017-07-20 00:42:00 +09:00
Seiichi Uchida
cf8b191852
Put the brace of match on the next line if condition is multi-lined
2017-07-20 00:42:00 +09:00
Seiichi Uchida
b78b6e8b09
Format source codes and update tests
2017-07-20 00:42:00 +09:00
Seiichi Uchida
0a2567db93
Implement RFC style for match
...
Put the opening brace of match arm's body on the next line if the pattern has
guard and consists of multi lines.
2017-07-20 00:42:00 +09:00
Seiichi Uchida
de403f4f65
Use offset_left instead of shrink_left
2017-07-20 00:41:36 +09:00
topecongiro
dcb953b901
Add trailing comma when using Mixed indent style with newline
2017-07-13 20:32:46 +09:00
topecongiro
6fd291981e
Sort imports in alphabetical and consistent order
2017-07-13 18:42:14 +09:00
topecongiro
2fb66cd1d3
Add trailing_semicolon config option
...
trailing_semicolon controls whether to add a trailing semicolon after break,
continue and return.
2017-07-12 14:16:06 +09:00
topecongiro
e3310a6a18
Format source codes
2017-07-11 21:53:10 +09:00
topecongiro
08f3f03353
Implement combining against match arms
2017-07-11 21:52:27 +09:00
Nick Cameron
4cfc2bfbd4
Merge pull request #1778 from topecongiro/rfc/match-arm-multiline-pattern
...
Rfc: fix up match arm pattern
2017-07-11 16:11:09 +12:00
topecongiro
76228e81de
Format source codes
2017-07-10 16:52:50 +09:00
topecongiro
d1e124b03a
Fix up rewriting match arm pattern
2017-07-10 16:52:07 +09:00
topecongiro
7ab4bdfd85
Use correct one line budget when rewriting index
2017-07-10 14:23:29 +09:00
Seiichi Uchida
bc63d69c3f
Format source codes
2017-07-10 02:24:59 +09:00
Seiichi Uchida
588700c3dc
Refactor rewrite_assign_rhs
...
1. Stop using mut var
2. Use block indent when breaking lines
2017-07-10 02:22:59 +09:00
Seiichi Uchida
e355c85b42
Use rewrite_assign_rhs for rewriting pattern in condition
2017-07-10 02:22:15 +09:00
Seiichi Uchida
b897310d79
Prefer to put the whole pattern of match arm on one line
2017-07-10 02:20:28 +09:00
Seiichi Uchida
72b155a9e2
Implement rhs_overhead method against Shape
2017-07-10 02:16:57 +09:00
topecongiro
57466dc687
Format source codes
2017-07-07 09:04:06 +09:00
topecongiro
2dd8d6d097
Add Clone trait bound to write_list
2017-07-07 09:04:06 +09:00
Nick Cameron
cfec7ad593
Merge pull request #1745 from topecongiro/assignment
...
Put rhs of assignment on the next line if it fits in a single line
2017-07-07 11:54:06 +12:00
Nick Cameron
b9a1938098
Merge pull request #1768 from topecongiro/huge-array
...
Add array_horizontal_layout_threshold option
2017-07-07 06:48:48 +12:00
topecongiro
8e8e7a4215
Add array_horizontal_layout_threshold option
2017-07-06 01:19:36 +09:00
topecongiro
d613f75676
Use correct one line budget for array in Block indent style
2017-07-05 19:19:54 +09:00
topecongiro
cb48435ff3
Format source codes
2017-07-05 18:31:37 +09:00
topecongiro
0237347abc
Update heuristic in rewrite_assign_rhs
...
Put the rhs of assignement on the next line when putting next to `lhs = ` will
cause rhs to go multi line, but putting on the next line makes it fits
in a single line.
2017-07-05 18:30:11 +09:00
topecongiro
6a7f866cfe
Format source codes
2017-07-05 18:12:43 +09:00
topecongiro
f8586bac2a
Handle comment at the last element in write_list
2017-07-05 18:01:34 +09:00
Nick Cameron
6546aaf5ec
Merge pull request #1767 from topecongiro/range-with-floating-literal
...
Add a space before range if lhs ends with dot
2017-07-05 15:46:43 +12:00