Commit Graph

2093 Commits

Author SHA1 Message Date
topecongiro
2915167179 Cargo fmt and update tests 2017-09-19 11:41:50 +09:00
topecongiro
b12fecb631 Use horizontal layout for a function with a single argument
foo(long_arg)

instead of

foo(
    long_arg,
)
2017-09-19 11:41:05 +09:00
topecongiro
b751030640 Remove unnecessary wrap_str() 2017-09-19 11:40:20 +09:00
topecongiro
007c673012 Remove noisy print from test 2017-09-19 11:02:21 +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
Nick Cameron
8974f89381 Merge pull request #1980 from topecongiro/less-recover_comment_removed
Run recover_comment_removed() only if the text changed after format
2017-09-19 07:46:32 +12: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
Seiichi Uchida
20aecb3d98 Run recover_comment_removed() only if the text changed after format 2017-09-18 22:56:29 +09:00
Nick Cameron
c313fb1ddc Merge pull request #1973 from topecongiro/issue-1972
Echo back input from stdin when disable_all_formatting is true
2017-09-18 18:06:49 +12:00
topecongiro
dc26b069f6 Remove a duplicate test 2017-09-18 14:20:40 +09:00
topecongiro
75a36f2886 Add a test for 'disable_all_formatting = true' with stdin 2017-09-18 14:19:50 +09:00
Nick Cameron
3637760102 Merge pull request #1969 from topecongiro/deprecate-binary-search
Remove rewrite_call_with_binary_search()
2017-09-18 16:28:14 +12:00
Seiichi Uchida
b02e813db7 Remove rewrite_call_with_binary_search() 2017-09-18 13:09:41 +09:00
Nick Cameron
d906ea23c7 Merge pull request #1968 from topecongiro/issue-1967
Reorder use items inside blocks
2017-09-18 12:59:25 +12: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
Nick Cameron
144da0dfdd Merge pull request #1964 from topecongiro/rfc/binop
RFC: binop
2017-09-18 12:41:54 +12:00
Seiichi Uchida
5a97e37de5 Merge pull request #1965 from topecongiro/issue-1963
Avoid panicking when calling 'cargo fmt --all'
2017-09-18 00:11:17 +09:00
Seiichi Uchida
ede179c62e Echo back input from stdin when disable_all_formatting is true 2017-09-17 22:14:28 +09:00
topecongiro
1f1e037d8b Avoid panicking when calling 'cargo fmt --all' 2017-09-15 23:24:17 +09:00
Seiichi Uchida
bb4a6bf66a Update tests 2017-09-15 22:32:03 +09:00
Seiichi Uchida
178a339fc3 Reorder use items inside blocks 2017-09-15 22:31:52 +09:00
Seiichi Uchida
8e5c76094d Implement ptr_vec_to_ref_vec() 2017-09-15 22:27:20 +09:00
topecongiro
f0580ae91a Use Cow to avoid unnecessary allocation 2017-09-15 18:21:06 +09:00
topecongiro
0b3b89d51f Remove unnecessary return 2017-09-15 17:09:45 +09:00
topecongiro
0b5d524486 Remove unnecessary references 2017-09-15 17:09:30 +09:00
topecongiro
ed2687f33b Cargo update 2017-09-15 17:05:27 +09:00
topecongiro
bc56e7b710 Add visual guide for binop_separator 2017-09-15 15:10:34 +09:00
topecongiro
d55b3492c0 Rename binop_sep to binop_separator 2017-09-15 15:05:41 +09:00
topecongiro
2d21c0c30b Split after the colon of type ascription 2017-09-15 15:04:30 +09:00
topecongiro
ff30782725 Update tests 2017-09-15 12:20:58 +09:00
topecongiro
f51261e93e Cargo fmt 2017-09-15 12:10:58 +09:00
topecongiro
45e48ec424 Add a new config option to control the placement of a binary operator 2017-09-15 12:10:30 +09:00
Nick Cameron
7e309a4ad8 nightly-0.2.6 2017-09-14 16:06:36 +12:00
Nick Cameron
a1fd68da46 Merge pull request #1948 from topecongiro/issue-1137
Use write_list() to format imports
2017-09-07 17:35:14 +12:00
topecongiro
903d815228 Clean up 2017-09-06 19:30:51 +09:00
topecongiro
4dbda06629 Use push_rewrite() to remove duplicates 2017-09-06 19:24:23 +09:00
topecongiro
4bd0373757 No cloning 2017-09-06 19:24:14 +09:00
topecongiro
0d748cf4c8 Update tests 2017-09-06 18:48:09 +09:00
topecongiro
662ee46e67 Use write_list() to format imports 2017-09-06 18:47:50 +09:00
topecongiro
af404b998c Factor out rewrite_extern_crate() 2017-09-06 18:44:33 +09:00
Nick Cameron
3b6a5fa881 Merge pull request #1947 from topecongiro/issue-1275
Use the last line's width for indent width in rewriting missed span to fix unindented comments
2017-09-06 10:21:46 +12:00
Seiichi Uchida
97d9e6b373 Use the last line's width for indent width in rewriting missed span
to fix unindented comments
2017-09-05 16:54:02 +09:00
Seiichi Uchida
2fb5affb5f Remove duplicates inside visit_stmt() 2017-09-05 16:50:55 +09:00
Nick Cameron
435ab867c3 Merge pull request #1945 from topecongiro/issue-1095
Exclude prefix colon from span when rewriting comment
2017-09-05 11:00:31 +12:00
Nick Cameron
84e7ef0ab7 Merge pull request #1944 from topecongiro/issue-1943
Take attributes_on_same_line_as_field into account
2017-09-05 10:53:36 +12:00
Nick Cameron
dc9810e242 Merge pull request #1942 from topecongiro/fixes
Some Fixes
2017-09-05 10:52:41 +12:00
Nick Cameron
f07dec329e Merge pull request #1940 from topecongiro/issue-1934
Avoid rewriting big block twice
2017-09-05 10:50:33 +12:00
Seiichi Uchida
c720a3a38e Remove colon from faulty span 2017-09-05 01:04:31 +09:00
Seiichi Uchida
e6e696f7b0 Avoid cloning String 2017-09-05 01:04:08 +09:00