Commit Graph

1702 Commits

Author SHA1 Message Date
Nick Cameron
450631ae67 Merge pull request #1633 from topecongiro/rfc/control-style
Do not add offset to match pattern when using Rfc style
2017-06-06 14:54:28 +12:00
Nick Cameron
7c13b7611d Merge pull request #1631 from topecongiro/fix-appveyor
Update appveyor.yml
2017-06-06 14:53:31 +12:00
Nick Cameron
130aa70e3a Merge pull request #1621 from topecongiro/combining
Combine more expressions
2017-06-06 14:52:48 +12:00
est31
aa4cd311bb Add config options for spaces around the colon in struct literal fields
In Rust, colons are used for three purposes:

* Type annotations, including type ascription
* Trait bounds
* Struct literal fields

This commit adds options for the last missing of the three purposes,
struct literal fields.
2017-06-06 03:50:58 +02:00
topecongiro
86be2e7bf8 Do not add offset to match pattern when using Rfc style 2017-06-05 17:57:43 +09:00
Seiichi Uchida
5121552d75 Update appveyor.yml 2017-06-05 17:30:56 +09:00
topecongiro
7250a468f9 Format source codes 2017-06-05 15:32:21 +09:00
topecongiro
41b7cc6a73 Set combine_control_expr to false by default and true in rfc-rustfmt 2017-06-05 15:31:44 +09:00
topecongiro
0292640e14 Allow chain item to extend if the parent ends with closing parens and alike 2017-06-05 15:31:05 +09:00
Nick Cameron
d04ab9e5ba Merge pull request #1630 from topecongiro/issue-1115
Allow comments after attributes on enum fields
2017-06-05 11:41:52 +12:00
Nick Cameron
14a1ea8193 Merge pull request #1629 from topecongiro/issue-982
Use recover_comment_removed in rewrite_static
2017-06-05 11:37:21 +12:00
topecongiro
d7de5b7656 Allow comments after attributes on enum fields 2017-06-04 23:27:21 +09:00
topecongiro
dcc7f32152 Format source codes 2017-06-04 19:37:24 +09:00
topecongiro
b49269ad39 Forbid method chain to get combined if it uses multi line.
If the method chain goes multi line before the last element, disallow combining
the method chain.
2017-06-04 19:37:24 +09:00
topecongiro
fabbef2c3e Add macro to block expr 2017-06-04 19:35:29 +09:00
topecongiro
62d200d9cf Update tests 2017-06-04 19:35:29 +09:00
topecongiro
a9f529cba4 Format source codes 2017-06-04 19:35:29 +09:00
topecongiro
4a0094f28f Add combine_control_expr option 2017-06-04 19:35:29 +09:00
topecongiro
b548d8d773 Refactor rewrite_call 2017-06-04 19:35:29 +09:00
topecongiro
a01ad30459 Forbid line break between if and pattern 2017-06-04 19:35:29 +09:00
topecongiro
fef347cb9e Add use_block_indent method to RewriteContext 2017-06-04 19:35:29 +09:00
topecongiro
d54634bd7c Use recover_comment_removed in rewrite_static 2017-06-04 18:44:08 +09:00
Nick Cameron
3e25e628a1 Merge pull request #1619 from topecongiro/config/format_if_else_cond_comment
Add format_if_else_cond_comment config option
2017-06-04 15:26:26 +12:00
Nick Cameron
6f1cb950d6 Merge pull request #1628 from topecongiro/issue-1113
Preserve the layout of comment after return type
2017-06-04 11:40:37 +12:00
Nick Cameron
3090086000 Merge pull request #1627 from topecongiro/issue-1624
Refactor vertical layout of function definition with options
2017-06-04 11:34:25 +12:00
Nick Cameron
9f96233a35 Merge pull request #1626 from topecongiro/issue-1623
Forbid trailing comma at the end of args of variadic functions
2017-06-04 11:32:37 +12:00
topecongiro
15e936bfc7 Preserve the layout of comment after return type 2017-06-04 06:59:55 +09:00
Seiichi Uchida
dd13761f85 Organize vertical layout of function definition 2017-06-03 23:18:39 +09:00
Seiichi Uchida
9b7ba980cf Use correct budget 2017-06-03 23:17:30 +09:00
Seiichi Uchida
d21792a730 Put opening paren next to multi line generic 2017-06-03 23:16:29 +09:00
Seiichi Uchida
08b5375776 Forbid trailing comma at the end of args of variadic functions 2017-06-03 15:03:08 +09:00
topecongiro
aadd3e11f4 Unindent comment on top of else 2017-06-02 11:58:58 +09:00
Seiichi Uchida
5650411d64 Fix a typo 2017-06-02 11:20:49 +09:00
Nick Cameron
cdc3f9321c Rename the Style::Default option to Legacy 2017-06-02 11:44:38 +12:00
Nick Cameron
0480f7e105 Merge pull request #1620 from topecongiro/rfc-if
Use correct line budget when using Rfc control style
2017-06-02 11:36:16 +12:00
topecongiro
fbd4b87329 Use correct one line budget when using Rfc control style 2017-06-01 19:59:50 +09:00
Nick Cameron
535a0160d6 Merge pull request #1616 from topecongiro/nested-closure
Use block indent style when visual indent style fails
2017-06-01 15:42:16 +12:00
Seiichi Uchida
10c3632078 Format source codes 2017-06-01 12:08:25 +09:00
Seiichi Uchida
789abf063d Use block indent style when visual indent failed 2017-06-01 12:08:20 +09:00
Nelo Mitranim
ae256504a8 suggested a better Sublime Text plugin
RustFmt is much faster than BeautifyRust and preserves scroll position
2017-06-01 00:39:12 +03:00
Nick Cameron
f6e8e9facc Merge pull request #1613 from khadiwala/master
Expose methods to locate and load config
2017-05-31 15:32:04 +12:00
Ravi Khadiwala
3d0ea5a099 Fix typo in from_toml_path 2017-05-30 22:25:24 -05:00
Ravi Khadiwala
17995e1539 Expose methods to locate and load config
* Make method for searching parents for toml file public
* Make method for loading config from path directly public, tweak the
  API since it was never returning None
2017-05-30 21:41:30 -05:00
Nick Cameron
4d0ee80e61 Merge pull request #1609 from topecongiro/nested-tuple
Put a space between nested tuple field
2017-05-31 11:58:03 +12:00
topecongiro
b63e3aaa83 Put a space between nested tuple field 2017-05-30 20:40:05 +09:00
Nick Cameron
cfa3d59974 Merge pull request #1608 from topecongiro/issue-1598
Fix index bug in write_snippet_inner
2017-05-30 15:28:44 +12:00
Nick Cameron
f7de945f9e Merge pull request #1607 from topecongiro/many-slashes
Allow longer custom comments
2017-05-30 15:28:11 +12:00
topecongiro
33a7357543 Fix index bug in write_snippet_inner 2017-05-30 10:53:48 +09:00
topecongiro
924a9b5cb6 Allow longer custom comment 2017-05-30 08:46:25 +09:00
Nick Cameron
b79094262f Merge pull request #1604 from topecongiro/comment-group
Format comments with different opening in different manner
2017-05-30 08:53:22 +12:00