Shotaro Yamada
9fda937779
Remove redundant &
2019-03-29 19:17:50 +09:00
Shotaro Yamada
ff0683d666
Simplify iterators
2019-03-29 19:06:32 +09:00
Stjepan Glavina
1fa06ecf1e
Fix formatting of async blocks
2019-03-20 18:18:02 +01:00
Seiichi Uchida
5f3dfe6c51
Format the if expression at the end of the block in a single line ( #3338 )
2019-03-11 23:18:43 +09:00
Alexander Regueiro
7a3b7c9275
Various cosmetic improvements ( #3403 )
2019-02-19 11:56:42 +09:00
Hirokazu Hata
8183b949c4
cargo fmt
2019-02-09 16:20:38 +09:00
Hirokazu Hata
4bb90f5cc8
Fix rust_2018_idioms warnings
2019-02-09 16:14:30 +09:00
topecongiro
f4f9502ea7
Cargo update
...
- Update `rustc-ap-*` crates to 366.0.0
- Update the other crates to the latest stable
2019-02-06 23:06:15 +09:00
Evgenii
ece629b1cc
transition to Rust 2018
2019-02-04 13:30:43 +03:00
rchaser53
c2534f5324
fix "internal error: left behind trailing whitespace" with long lines
2019-02-01 19:58:38 +09:00
Seiichi Uchida
996d5e8d6c
Fix shape when formatting return or break expr on statement position ( #3259 )
2018-12-25 18:20:29 +09:00
Philipp Hansch
d0785954c8
Fix trim_right/trim_left deprecation warnings ( #3252 )
2018-12-18 11:21:31 +09:00
Stéphane Campinas
40174e9481
fix the visitor's starting position when visiting a labelled block
...
Close #3217
2018-11-28 22:50:17 +01:00
Matthias Krüger
3aa153398a
fix a few clippy warnings
...
types.rs:
fix single_char_pattern (use character patters instead of string for .ends_with() and .starts_with()
patterns.rs
expr.rs
file_lines.rs:
fix into_iter_on_ref_ptr (use iter() or iter_mut() instead of into_iter()
tests/mod.rs:
check_files(): take Option<PathBuf> by reference
2018-11-16 22:25:33 +01:00
Kevin Stenerson
97843377ee
Replace always true conditionals with true
2018-11-08 19:26:12 -07:00
Kevin Stenerson
25b828d35f
Add config option to more aggressively allow overflow
2018-11-05 21:12:40 -07:00
Stéphane Campinas
7132fe03a0
fix alignment of a struct's fields with the visual style
...
- rewrite_with_alignment was called from the expr module with the wrong
shape that missed the extra offset needed for the visual style
- rewrite_with_alignment was indenting the given shape although that
should have been the caller's responsability
2018-11-04 23:41:21 +01:00
Stéphane Campinas
30c06da781
force a newline after the if
condition if there is a different
...
indentation level
2018-10-15 23:24:35 +02:00
Nick Cameron
c09d7ef088
Merge pull request #3106 from sinkuu/clippy
...
Clippy and cleanups
2018-10-16 09:09:56 +13:00
Nick Cameron
bc4414e53c
Merge pull request #3101 from nrc/pair-newline
...
Simplify multi-lining binop exprs
2018-10-16 09:01:40 +13:00
Shotaro Yamada
d55729987f
Use UnOp::to_string
2018-10-15 23:59:08 +09:00
Daniele D'Orazio
075aa909cd
try to fix comment bad wrapping ( #3099 )
2018-10-15 11:18:37 +09:00
Nick Cameron
cbd568083d
Fixup formatting
2018-10-15 11:52:27 +13:00
Seiichi Uchida
5f5d04283c
Use correct width
...
When rewriting trait bounds on the next line, we do not want to add an extra
indentation. However, the max width should be smaller.
2018-10-14 21:47:55 +09:00
Otavio Salvador
2e9a97a84d
expr: replace .unwrap_or
with .map_or
...
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2018-10-12 20:21:22 -03:00
Nick Cameron
1b2e72726f
Merge pull request #3078 from YaLTeR/fix-closure-indentation
...
Fix inconsistent overflow behavior in Visual style
2018-10-08 14:38:49 +13:00
Nick Cameron
832a912f79
Merge pull request #3077 from YaLTeR/fix-extra-commas
...
Get rid of extra commas in Visual struct literal formatting
2018-10-08 14:37:48 +13:00
Nick Cameron
4dc5557625
Merge pull request #3070 from topecongiro/issue-3030
...
Format a paren expr with double slash comment
2018-10-08 13:05:36 +13:00
Ivan Molodetskikh
dee68434e6
Overflow Visual functions even with one argument
2018-10-06 16:32:38 +03:00
Ivan Molodetskikh
cbaed838d5
No trailing comma in struct literals (Visual)
2018-10-06 10:59:47 +03:00
Seiichi Uchida
70c8e366a6
Format a paren expr with double slash comment
2018-10-01 00:07:18 +09:00
Seiichi Uchida
052ba6c5df
Move maybe_get_args_offset to overflow.rs
2018-09-30 08:05:45 +09:00
Seiichi Uchida
63387824b3
Avoid using to_expr as much as possible
2018-09-30 08:05:45 +09:00
Seiichi Uchida
c302409f56
Get rid of ToExpr trait
2018-09-30 08:05:35 +09:00
Seiichi Uchida
755d27a424
Take impl Iterator for overflow routines
2018-09-29 14:33:00 +09:00
Seiichi Uchida
e2b9c66cc9
Cargo fmt
2018-09-19 23:22:26 +09:00
Seiichi Uchida
d4f7e219dc
Fix shape for index
2018-09-19 23:21:07 +09:00
Ivan Molodetskikh
838df8dfb6
Use correct heuristic for match block flattening
2018-09-11 08:54:43 +03:00
Nick Cameron
2291be7fa1
Merge pull request #2992 from max-sixty/clippy2
...
Clippy 2/2
2018-09-03 13:25:35 +12:00
Maximilian Roos
968affc3e0
final clippy changes
2018-09-01 16:32:38 -04:00
Ivan Molodetskikh
6a029974de
Fix shape in rewrite_tuple_in_visual_indent_style
2018-08-31 15:50:41 +03:00
Seiichi Uchida
78a0cde5bf
Format in-place expression like assignment
2018-08-26 13:20:25 +09:00
Zach Lute
ca19c9a35a
Fix build with rust nightly by updating try block syntax. ( #2965 )
2018-08-26 13:02:24 +09:00
cad97
fc1909d311
Reformat
2018-08-23 17:14:19 -04:00
cad97
04d804c365
Rename CodeMap/FileMap to SourceMap/SourceFile
...
#2946
2018-08-23 17:10:46 -04:00
Seiichi Uchida
024c03e81b
Use builder pattern for ListFormatting
2018-08-03 22:13:20 +09:00
Nick Cameron
3c20d8a9e6
Merge pull request #2874 from cavedweller/master
...
Format Async block and async fn
2018-07-31 08:52:07 +12:00
Ben Brittain
fedde3790c
Add tests for async & async move
2018-07-29 08:55:36 -07:00
Ben Brittain
0b25f602fd
Format Async block and async fn
2018-07-29 08:05:38 -07:00
Andrew Audibert
f121b1a3a9
Support raw identifiers in struct expressions
2018-07-28 19:40:52 -07:00