Commit Graph

75 Commits

Author SHA1 Message Date
Charles Lew
9f58224123 Update Unicode data to 15.0 2023-08-13 13:01:38 -05:00
Pascal Seitz
c65ba14d69 Fixes #5260
Fixes #5260 by checking if it is part of a type '::'
2022-05-08 13:22:35 -05:00
Stéphane Campinas
368a9b7cef
Handle non-ascii character at boundary (#5089)
* Handle non-ascii character at boundary

* Replace substraction underflow check with early termination
2022-02-01 19:06:14 -06:00
Frank Steffahn
9bc0dbeb64 Fix typos “an”→“a” and a few different ones that appeared in the same search 2021-08-22 18:15:49 +02:00
Caleb Cartwright
e4b8714c09 Merge commit '4236289b75ee55c78538c749512cdbeea5e1c332' into update-rustfmt 2021-07-25 22:57:19 -05:00
Stéphane Campinas
8073244420 improve detection of URL inside a string that is being rewritten. (#3809) 2019-10-07 16:43:50 +09:00
Ruben Schmidmeister
618d092bf7
Enable unreachable_pub lint 2019-05-09 20:37:51 +02:00
Matthias Krüger
4352681d62 fix clippy warnings
clippy::needless_return
clippy::redundant_closure
clippy::or_fun_call
clippy::len_zero
clippy::expect_fun_call
clippy::assertions_on_constants
clippy::identity_conversion
clippy::chars_last_cmp
2019-04-11 13:48:13 +02:00
Alexander Regueiro
7a3b7c9275 Various cosmetic improvements (#3403) 2019-02-19 11:56:42 +09:00
Evgenii
ece629b1cc transition to Rust 2018 2019-02-04 13:30:43 +03:00
wada314
a01990c4d0 Use Unicode-standard char width to wrap comments or strings. (#3275) 2019-01-15 08:41:09 +09:00
wada314
09c9cd4125 Fix issue #3263 (#3264) 2018-12-25 18:03:48 +09:00
Philipp Hansch
d0785954c8 Fix trim_right/trim_left deprecation warnings (#3252) 2018-12-18 11:21:31 +09:00
Matthias Krüger
b25f974c0d fix a few typos found via codespell. 2018-10-19 12:28:00 +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
6fb188bd43 Use concat() instead of join("") 2018-10-15 23:59:08 +09:00
Shotaro Yamada
6380f88527 Cleanup 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
Stéphane Campinas
375c87820f
rewrite_string: detect when a url is being split and place the new line
after it
2018-10-09 21:47:32 +02:00
Stéphane Campinas
8b3788d875
rewrite_string: allow to break on a boundary character that is on edge 2018-10-08 14:48:15 +02:00
Stéphane Campinas
bb7442802a
rewrite_string: retain blank lines that are trailing 2018-10-08 14:48:15 +02:00
Stéphane Campinas
1c6a2e3de8
rewrite_string: take care of blank lines appearing within the last line 2018-10-08 14:48:14 +02:00
Stéphane Campinas
3205e17cc3
rewrite_string: handle newlines in the last line that fits in the shape for cases where line_start is not a whitespace 2018-10-08 14:48:14 +02:00
Stéphane Campinas
2fc1de6b4a
rewrite_string: do not overflow the next line when the line_start is not a whitespace 2018-10-08 14:48:13 +02:00
Stéphane Campinas
f46082fbd8
rewrite_string: trim trailing whitespace in case the last_line fits in the given shape 2018-10-08 14:48:13 +02:00
Stéphane Campinas
4b26723e55
format_strings: take into account newline occurring within a rewritten line 2018-10-02 00:41:56 +02:00
Stéphane Campinas
86018133a0
removed unused max_width argument of rewrite_string function 2018-07-14 19:33:26 +02:00
Stéphane Campinas
472a2ed0f6
fix rewrite_string when a line feed is present in a sequence of whitespaces, resulting in strange formatting 2018-07-14 19:22:31 +02:00
Nick Cameron
486f8fd8e7 Fixup formatting of tests and source 2018-07-12 21:37:28 +12:00
Pazzaz
f711078126 Seperate and optimize grapheme conditions 2018-05-24 21:32:01 +02:00
Pazzaz
a1d137116b Avoid unnecessary comparisons with cur_end 2018-05-24 21:32:01 +02:00
Nick Cameron
39301ae5f2 Go back to a non-workspace structure
Kinda reverts https://github.com/rust-lang-nursery/rustfmt/pull/2419
2018-03-02 14:58:23 +13:00
topecongiro
4af2aa3a9e Create rustfmt_core crate 2018-02-07 22:48:05 +09:00
Seiichi Uchida
154bf8e1af Cargo fmt 2018-01-22 13:05:18 +09:00
topecongiro
bc31014423 Add an optional max width argument to rewrite_string() 2017-10-31 15:04:50 +09:00
topecongiro
7e99893e25 Use visual indent only when rewriting string literal 2017-10-31 15:03:46 +09:00
topecongiro
0d359eacd7 Cargo fmt 2017-10-18 22:23:25 +09:00
topecongiro
fe69dde96b Replace 'try_opt!' macro with a '?' operator 2017-10-05 20:50:19 +09:00
topecongiro
b74a0f960a Implement StringFormat::new() 2017-10-01 19:39:00 +09:00
Seiichi Uchida
df7d2be562 Move Indent and Shape to shape.rs from lib.rs 2017-09-19 10:04:35 +09:00
topecongiro
f51261e93e Cargo fmt 2017-09-15 12:10:58 +09:00
Seiichi Uchida
a8b0a6e4c5 Format source codes and update tests 2017-07-20 00:42:00 +09:00
topecongiro
6fd291981e Sort imports in alphabetical and consistent order 2017-07-13 18:42:14 +09:00
topecongiro
208ff15954 Format source codes 2017-06-16 08:49:49 +09:00
topecongiro
b8f11a4e3c Format source codes 2017-06-14 20:39:07 +09:00
Nick Cameron
18ccd0190e Rebasing 2017-06-13 14:49:47 +12:00
Nick Cameron
1f512948a0 Reformat source code using new defaults 2017-06-13 14:41:49 +12:00
topecongiro
86856491bc Format source codes 2017-05-25 16:08:08 +09:00