Ingvar Stepanyan
8691c64e99
cargo run cargo-fmt
...
Reformat codebase with current version to pass self_tests (formats macros without repetitions).
2018-02-04 12:09:03 +00:00
topecongiro
19d6a3c786
Put the opening brace of impl on the next line
...
We put the opening brace on the next line if the following conditions hold:
1. the result before '{' ends with comments or contains newline
2. the last line of the result before '{' is not extendable (i.e. consists of
'>' and whitespaces).
2018-01-04 12:46:55 +09:00
topecongiro
12ddaf93e2
Remove trim_newlines()
...
We call `trim_newlines()` after the `trim()`ed buffer, which is unnecessary.
2018-01-02 13:04:39 +09:00
Seiichi Uchida
939a6c5820
Get rid of GenericsArg wrapper type
...
`GenericsArg` is basically identical to `ast::GenericParam`.
Just use the latter.
2017-12-24 00:29:59 +09:00
Seiichi Uchida
228578b9c7
Add count_newlines() utility function
2017-12-05 15:17:40 +09:00
topecongiro
34c2499029
Cargo fmt
2017-11-16 17:43:06 +09:00
topecongiro
bc543cce0b
Combine spaces_within_parens and spaces_within_brackets
2017-11-14 23:42:31 +09:00
clippered
794a215b27
rename to use_colored_tty; used match as well
2017-11-13 20:18:05 +11:00
clippered
d2f2f25463
add cli option for color
2017-11-13 20:18:03 +11:00
topecongiro
e917eff7ba
Remove unused imports
2017-11-06 21:48:18 +09:00
topecongiro
b023cc831c
Remove static lifetime
2017-11-06 13:52:25 +09:00
Nick Cameron
5233f9cde0
Add support for crate
shorthand for pub(crate)
2017-10-28 18:41:58 +13:00
Seiichi Uchida
ed7ceebfe0
Faster last_line_extendable()
2017-10-07 22:45:33 +09:00
Seiichi Uchida
d38b3acee1
Simplify wrap_str()
2017-10-07 22:45:33 +09:00
Seiichi Uchida
c046a261a8
Change the signature of wrap_str()
2017-10-07 22:45:27 +09:00
Seiichi Uchida
dde0cdabe0
Remove String::rewrite()
2017-10-07 21:59:33 +09:00
Nick Cameron
802df67c2f
Merge pull request #2035 from topecongiro/deprecate-try_opt!
...
Replace `try_opt!` macro with a `?` operator
2017-10-05 20:45:52 +08:00
Nick Cameron
99f14a87ae
Merge pull request #2029 from wada314/fix-crlf
...
Fix broken tests under CRLF environment.
2017-10-05 20:07:29 +08:00
topecongiro
fe69dde96b
Replace 'try_opt!' macro with a '?' operator
2017-10-05 20:50:19 +09:00
Shohei Wada
25d2671c55
Fix broken tests under CRLF env.
2017-10-05 00:23:17 +09:00
topecongiro
62e38860b9
Handle 'extern "Rust"' in format_abi()
2017-09-29 15:08:48 +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
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
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
f51261e93e
Cargo fmt
2017-09-15 12:10:58 +09:00
Seiichi Uchida
4b79055a15
Apply refactoring from cargo clippy
2017-08-31 12:49:12 +09:00
Vadim Petrochenkov
6e5c6f5ba3
Use getters to access Span
fields
2017-08-31 14:14:13 +12:00
topecongiro
831db35a83
Move isatty() to utils.rs
2017-08-15 16:49:02 +09:00
topecongiro
0af19985fc
Generalize combine_attr_and_expr
2017-08-11 17:52:13 +09:00
topecongiro
60fb11e5dd
Do not take inner attributes into account for span
2017-08-05 15:21:46 +09:00
Seiichi Uchida
14f416273b
Add format_constness() and last_line_used_width()
2017-08-01 22:27:12 +09:00
Emilio Cobos Álvarez
6bf9124ace
visitor: Make sure to don't eat or realign items when they should be skipped due to file-lines.
...
Before this patch, stuff like the argument with the comment was realigned to
column 0, even when being outside of the file_lines range.
2017-07-31 09:14:58 +01:00
topecongiro
5aff5beb2a
More fine-grained file-lines
2017-07-29 16:11:36 +09:00
topecongiro
c3cc8fcb13
Format defaultness
2017-07-27 09:43:35 +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
Seiichi Uchida
bc63d69c3f
Format source codes
2017-07-10 02:24:59 +09:00
topecongiro
f8586bac2a
Handle comment at the last element in write_list
2017-07-05 18:01:34 +09:00
Seiichi Uchida
b99f3cb447
Allow extending a chain after raw string literal
2017-06-19 22:06:08 +09:00
topecongiro
3dcd3d7fb0
Combine condition and body of control flow
...
If the condition of control flow expressions ends with closing parens and alike,
put the opening bracket of the body on the same line with closing parens.
2017-06-18 14:27:58 +09:00
topecongiro
7132814a71
Fix wrap_str
...
Use shape.width for the first line and shape.used_width() for the last line.
2017-06-17 16:54:25 +09:00
topecongiro
208ff15954
Format source codes
2017-06-16 08:49:49 +09:00
topecongiro
8a6e9f689b
Format source codes
2017-06-15 16:26:41 +09:00
Nick Cameron
1f512948a0
Reformat source code using new defaults
2017-06-13 14:41:49 +12:00
Nick Cameron
de6bfc4ad7
Rebasing
2017-06-06 07:32:06 +02:00
topecongiro
e994eac3f1
Format pub(restricted) properly
2017-06-06 07:32:06 +02:00