]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoFormat source codes
topecongiro [Wed, 5 Jul 2017 09:31:37 +0000 (18:31 +0900)]
Format source codes

7 years agoUpdate heuristic in rewrite_assign_rhs
topecongiro [Wed, 5 Jul 2017 09:30:11 +0000 (18:30 +0900)]
Update heuristic in rewrite_assign_rhs

Put the rhs of assignement on the next line when putting next to `lhs = ` will
cause rhs to go multi line, but putting on the next line makes it fits
in a single line.

7 years agoRefactor rewrite_static
topecongiro [Wed, 5 Jul 2017 09:25:50 +0000 (18:25 +0900)]
Refactor rewrite_static

7 years agonightly-0.1.8
Nick Cameron [Wed, 5 Jul 2017 03:59:24 +0000 (15:59 +1200)]
nightly-0.1.8

7 years agoMerge pull request #1767 from topecongiro/range-with-floating-literal
Nick Cameron [Wed, 5 Jul 2017 03:46:43 +0000 (15:46 +1200)]
Merge pull request #1767 from topecongiro/range-with-floating-literal

Add a space before range if lhs ends with dot

7 years agoMerge pull request #1765 from topecongiro/v-alignment/struct-field
Nick Cameron [Wed, 5 Jul 2017 00:11:52 +0000 (12:11 +1200)]
Merge pull request #1765 from topecongiro/v-alignment/struct-field

Add vertical alignment option for struct fields

7 years agoAdd a space before range if lhs ends with dot
topecongiro [Tue, 4 Jul 2017 11:21:49 +0000 (20:21 +0900)]
Add a space before range if lhs ends with dot

7 years agoMerge pull request #1757 from topecongiro/rfc/combine-array
Nick Cameron [Tue, 4 Jul 2017 06:22:32 +0000 (18:22 +1200)]
Merge pull request #1757 from topecongiro/rfc/combine-array

Rfc: Combine Array

7 years agoMerge pull request #1756 from topecongiro/closure_block_indent_threshold
Nick Cameron [Tue, 4 Jul 2017 06:21:11 +0000 (18:21 +1200)]
Merge pull request #1756 from topecongiro/closure_block_indent_threshold

Use correct one line budget in rewrite_closure_block

7 years agoMerge pull request #1752 from topecongiro/supress-write-mode-warning
Nick Cameron [Tue, 4 Jul 2017 06:11:48 +0000 (18:11 +1200)]
Merge pull request #1752 from topecongiro/supress-write-mode-warning

Suppress write mode warning

7 years agoMerge pull request #1750 from topecongiro/multi-lined-index
Nick Cameron [Tue, 4 Jul 2017 06:11:01 +0000 (18:11 +1200)]
Merge pull request #1750 from topecongiro/multi-lined-index

Put multi-lined index on the next line if it fits in one line

7 years agoUpdate tests
topecongiro [Mon, 3 Jul 2017 09:55:11 +0000 (18:55 +0900)]
Update tests

Now structs.rs has no overflowing max_width :)

7 years agoAdd struct_field_align_threshold for vertical alignment
topecongiro [Mon, 3 Jul 2017 09:54:41 +0000 (18:54 +0900)]
Add struct_field_align_threshold for vertical alignment

7 years agoFormat source codes
topecongiro [Mon, 3 Jul 2017 09:54:26 +0000 (18:54 +0900)]
Format source codes

7 years agoUse correct width and tactic for struct literal
topecongiro [Mon, 3 Jul 2017 09:53:47 +0000 (18:53 +0900)]
Use correct width and tactic for struct literal

7 years agoImplement Spanned for ast::StructField and ast::Field
topecongiro [Mon, 3 Jul 2017 09:48:21 +0000 (18:48 +0900)]
Implement Spanned for ast::StructField and ast::Field

7 years agoUpdate tests
topecongiro [Thu, 29 Jun 2017 02:01:22 +0000 (11:01 +0900)]
Update tests

7 years agoCombine Array
topecongiro [Thu, 29 Jun 2017 02:00:51 +0000 (11:00 +0900)]
Combine Array

7 years agoUse correct one line budget in rewrite_closure_block
topecongiro [Wed, 28 Jun 2017 01:56:29 +0000 (10:56 +0900)]
Use correct one line budget in rewrite_closure_block

7 years agoAdd an option to inhibit warning on write-mode change
topecongiro [Mon, 26 Jun 2017 05:11:34 +0000 (14:11 +0900)]
Add an option to inhibit warning on write-mode change

7 years agoPut multi-lined index on the next line if it fits in one line
topecongiro [Sun, 25 Jun 2017 22:57:06 +0000 (07:57 +0900)]
Put multi-lined index on the next line if it fits in one line

7 years agonightly-0.1.7
Nick Cameron [Fri, 23 Jun 2017 05:03:47 +0000 (17:03 +1200)]
nightly-0.1.7

7 years agoMerge pull request #1744 from topecongiro/macro-arguments-trailing-comma
Nick Cameron [Fri, 23 Jun 2017 05:02:45 +0000 (17:02 +1200)]
Merge pull request #1744 from topecongiro/macro-arguments-trailing-comma

Do not add trailing comma inside macro invocation unless there alreay is

7 years agoDo not add trailing comma inside macro invocation unless there already is
topecongiro [Fri, 23 Jun 2017 04:40:30 +0000 (13:40 +0900)]
Do not add trailing comma inside macro invocation unless there already is

7 years agonightly-0.1.6
Nick Cameron [Fri, 23 Jun 2017 04:30:19 +0000 (16:30 +1200)]
nightly-0.1.6

7 years agoMerge pull request #1743 from topecongiro/macro-trailing-comma
Nick Cameron [Fri, 23 Jun 2017 04:23:32 +0000 (16:23 +1200)]
Merge pull request #1743 from topecongiro/macro-trailing-comma

Preserve trailing comma of macro invocation

7 years agoUpdate tests inside macro.rs
topecongiro [Fri, 23 Jun 2017 03:57:34 +0000 (12:57 +0900)]
Update tests inside macro.rs

I moved around some tests in order to prevent rustfmt from failing to format
tests after macro invocations whose arguments cannot be parsed as expressions.

7 years agoPreserve trailing comma of macro invocation
topecongiro [Fri, 23 Jun 2017 03:56:57 +0000 (12:56 +0900)]
Preserve trailing comma of macro invocation

7 years agoMerge pull request #1738 from birkenfeld/patch-1
Nick Cameron [Wed, 21 Jun 2017 23:09:40 +0000 (11:09 +1200)]
Merge pull request #1738 from birkenfeld/patch-1

Handle proc-macro crates in cargo-fmt

7 years agoMerge pull request #1740 from euclio/patch-2
Nick Cameron [Wed, 21 Jun 2017 19:59:19 +0000 (07:59 +1200)]
Merge pull request #1740 from euclio/patch-2

remove link to old style guidelines

7 years agoremove link to old style guidelines
Andy Russell [Wed, 21 Jun 2017 17:45:24 +0000 (13:45 -0400)]
remove link to old style guidelines

Fixes #1564.

7 years agoHandle proc-macro crates in cargo-fmt
Georg Brandl [Wed, 21 Jun 2017 05:32:23 +0000 (07:32 +0200)]
Handle proc-macro crates in cargo-fmt

7 years agoMerge pull request #1729 from topecongiro/single-line-block
Nick Cameron [Tue, 20 Jun 2017 20:33:12 +0000 (08:33 +1200)]
Merge pull request #1729 from topecongiro/single-line-block

Allow single line block in expression context

7 years agoFix a typo
topecongiro [Tue, 20 Jun 2017 13:35:56 +0000 (22:35 +0900)]
Fix a typo

7 years agoUpdate tests
topecongiro [Tue, 20 Jun 2017 12:36:28 +0000 (21:36 +0900)]
Update tests

7 years agoUse format_expr wherever single-lined block is not allowed
topecongiro [Tue, 20 Jun 2017 12:35:52 +0000 (21:35 +0900)]
Use format_expr wherever single-lined block is not allowed

7 years agoRefactor rewrite for ast::Block
topecongiro [Tue, 20 Jun 2017 12:34:19 +0000 (21:34 +0900)]
Refactor rewrite for ast::Block

7 years agoAdd warning about write-mode change
Nick Cameron [Tue, 20 Jun 2017 06:47:32 +0000 (18:47 +1200)]
Add warning about write-mode change

7 years agonightly-0.1.5
Nick Cameron [Tue, 20 Jun 2017 05:00:01 +0000 (17:00 +1200)]
nightly-0.1.5

7 years agoMerge pull request #1709 from theotherphil/master
Nick Cameron [Tue, 20 Jun 2017 04:29:01 +0000 (16:29 +1200)]
Merge pull request #1709 from theotherphil/master

Fix defaults in Configurations.md

7 years agoMerge pull request #1732 from olson-sean-k/issue-1377
Seiichi Uchida [Tue, 20 Jun 2017 03:07:03 +0000 (12:07 +0900)]
Merge pull request #1732 from olson-sean-k/issue-1377

Keep brace on same line as `match` when using `ClosingNextLine`.

7 years agoMerge pull request #1735 from kogai/public-file-lines
Nick Cameron [Tue, 20 Jun 2017 01:09:43 +0000 (13:09 +1200)]
Merge pull request #1735 from kogai/public-file-lines

Public file-lines constructor

7 years agoMerge pull request #1734 from topecongiro/raw-string-literal
Nick Cameron [Tue, 20 Jun 2017 00:29:25 +0000 (12:29 +1200)]
Merge pull request #1734 from topecongiro/raw-string-literal

Allow extending a chain after raw string literal

7 years agoMerge pull request #1733 from topecongiro/cargo-fmt
Nick Cameron [Tue, 20 Jun 2017 00:28:36 +0000 (12:28 +1200)]
Merge pull request #1733 from topecongiro/cargo-fmt

Do not run cargo fmt if there are unnecessary arguments

7 years agoMerge pull request #1728 from topecongiro/trailing-comma
Nick Cameron [Tue, 20 Jun 2017 00:22:58 +0000 (12:22 +1200)]
Merge pull request #1728 from topecongiro/trailing-comma

Apply config.trailing_comma wherever possible

7 years agoFix control_style example
Phil Ellison [Mon, 19 Jun 2017 18:43:38 +0000 (19:43 +0100)]
Fix control_style example

7 years agoModify `control_brace_sytle` test to ensure `match` braces are formatted correctly.
Sean Olson [Mon, 19 Jun 2017 15:12:15 +0000 (08:12 -0700)]
Modify `control_brace_sytle` test to ensure `match` braces are formatted correctly.

7 years agoDo not run cargo fmt if there are unnecessary arguments
Seiichi Uchida [Mon, 19 Jun 2017 14:39:59 +0000 (23:39 +0900)]
Do not run cargo fmt if there are unnecessary arguments

7 years agoKeep brace on same line as `match` when using `ClosingNextLine` for `control_brace_st...
Sean Olson [Mon, 19 Jun 2017 14:14:51 +0000 (07:14 -0700)]
Keep brace on same line as `match` when using `ClosingNextLine` for `control_brace_style`.

7 years agoAllow extending a chain after raw string literal
Seiichi Uchida [Mon, 19 Jun 2017 13:06:08 +0000 (22:06 +0900)]
Allow extending a chain after raw string literal

7 years agoPublic file-lines constructor
shinichi kogai [Mon, 19 Jun 2017 12:14:33 +0000 (21:14 +0900)]
Public file-lines constructor

7 years agoApply config.trailing_comma wherever possible
topecongiro [Mon, 19 Jun 2017 07:00:04 +0000 (16:00 +0900)]
Apply config.trailing_comma wherever possible

7 years agoMerge pull request #1727 from topecongiro/disallow-overflowing-closure
Nick Cameron [Mon, 19 Jun 2017 04:49:29 +0000 (16:49 +1200)]
Merge pull request #1727 from topecongiro/disallow-overflowing-closure

Disallow overflowing closure if there are multiple closures in args

7 years agoDisallow overflowing closure if there are multiple closures in args
topecongiro [Mon, 19 Jun 2017 03:07:20 +0000 (12:07 +0900)]
Disallow overflowing closure if there are multiple closures in args

7 years agoMerge pull request #1726 from topecongiro/tuple-overflow
Nick Cameron [Mon, 19 Jun 2017 02:36:50 +0000 (14:36 +1200)]
Merge pull request #1726 from topecongiro/tuple-overflow

Apply the same overflowing rule to tuple as function call

7 years agoUpdate tests
topecongiro [Mon, 19 Jun 2017 02:25:21 +0000 (11:25 +0900)]
Update tests

7 years agoApply the same overflowing rule to tuple as function call
topecongiro [Mon, 19 Jun 2017 02:24:36 +0000 (11:24 +0900)]
Apply the same overflowing rule to tuple as function call

7 years agonightly-0.1.4
Nick Cameron [Mon, 19 Jun 2017 01:22:42 +0000 (13:22 +1200)]
nightly-0.1.4

7 years agoMerge pull request #1724 from topecongiro/multiline-string-lit
Nick Cameron [Mon, 19 Jun 2017 01:02:21 +0000 (13:02 +1200)]
Merge pull request #1724 from topecongiro/multiline-string-lit

Align multiline string literal

7 years agoMerge pull request #1711 from topecongiro/combine-control-flow-condition-body
Nick Cameron [Mon, 19 Jun 2017 01:00:27 +0000 (13:00 +1200)]
Merge pull request #1711 from topecongiro/combine-control-flow-condition-body

Combine control flow condition and body

7 years agoMerge pull request #1719 from topecongiro/macro-on-rhs
Nick Cameron [Mon, 19 Jun 2017 01:00:12 +0000 (13:00 +1200)]
Merge pull request #1719 from topecongiro/macro-on-rhs

Avoid line break when rhs of assignment is an invalid macro

7 years agomake file_lines::Range public
Nick Cameron [Mon, 19 Jun 2017 00:58:29 +0000 (12:58 +1200)]
make file_lines::Range public

7 years agoFormat source codes
Seiichi Uchida [Sun, 18 Jun 2017 13:45:08 +0000 (22:45 +0900)]
Format source codes

7 years agoAlign multiline string literal
Seiichi Uchida [Sun, 18 Jun 2017 13:44:56 +0000 (22:44 +0900)]
Align multiline string literal

7 years agoDocument control_style in Configurations.md
Phil Ellison [Sun, 18 Jun 2017 09:37:05 +0000 (10:37 +0100)]
Document control_style in Configurations.md

7 years agoUpdate names on where_style code snippets
Phil Ellison [Sun, 18 Jun 2017 08:34:24 +0000 (09:34 +0100)]
Update names on where_style code snippets

7 years agoFix names of possible values for where_style
Phil Ellison [Sun, 18 Jun 2017 07:33:32 +0000 (08:33 +0100)]
Fix names of possible values for where_style

7 years agoFormat source codes
topecongiro [Sat, 17 Jun 2017 12:17:20 +0000 (21:17 +0900)]
Format source codes

7 years agoCombine condition and body of control flow
topecongiro [Sat, 17 Jun 2017 12:11:55 +0000 (21:11 +0900)]
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.

7 years agoAvoid line break when rhs of assignment is an invalid macro
Seiichi Uchida [Sat, 17 Jun 2017 17:35:18 +0000 (02:35 +0900)]
Avoid line break when rhs of assignment is an invalid macro

7 years agoMerge pull request #1717 from topecongiro/type-and-generics
Nick Cameron [Sun, 18 Jun 2017 03:57:34 +0000 (15:57 +1200)]
Merge pull request #1717 from topecongiro/type-and-generics

Refactor format against types and generics

7 years agoMerge pull request #1708 from topecongiro/chain-overflow
Nick Cameron [Sun, 18 Jun 2017 03:29:52 +0000 (15:29 +1200)]
Merge pull request #1708 from topecongiro/chain-overflow

Allow overflowing the last element of chain if it is originally multi-lined

7 years agoUpdate tests
Seiichi Uchida [Sat, 17 Jun 2017 17:04:03 +0000 (02:04 +0900)]
Update tests

7 years agoRefactor format against types and generics
Seiichi Uchida [Sat, 17 Jun 2017 17:00:58 +0000 (02:00 +0900)]
Refactor format against types and generics

Previous implementation relied on the fact that rustfmt used visual indent
style as a default. However, since now rustfmt uses block indent style against
most part of the code, we need some refactorings.

7 years agoFix defaults in Configurations.md
Phil Ellison [Sat, 17 Jun 2017 10:22:04 +0000 (11:22 +0100)]
Fix defaults in Configurations.md

7 years agoUpdate tests
topecongiro [Sat, 17 Jun 2017 07:57:00 +0000 (16:57 +0900)]
Update tests

7 years agoFormat source codes
topecongiro [Sat, 17 Jun 2017 07:56:54 +0000 (16:56 +0900)]
Format source codes

7 years agoUse correct budget for chain
topecongiro [Sat, 17 Jun 2017 07:56:37 +0000 (16:56 +0900)]
Use correct budget for chain

7 years agoFix wrap_str
topecongiro [Sat, 17 Jun 2017 07:54:25 +0000 (16:54 +0900)]
Fix wrap_str

Use shape.width for the first line and shape.used_width() for the last line.

7 years agoTry overflowing the last element of chain only if it goes multi line
topecongiro [Sat, 17 Jun 2017 06:33:29 +0000 (15:33 +0900)]
Try overflowing the last element of chain only if it goes multi line

7 years agoMerge pull request #1701 from topecongiro/issue-1697
Seiichi Uchida [Sat, 17 Jun 2017 07:25:10 +0000 (16:25 +0900)]
Merge pull request #1701 from topecongiro/issue-1697

Forbid overflowing closure if its header goes multi lines

7 years agoUse correct span for Infer type inside closure header
topecongiro [Fri, 16 Jun 2017 21:25:58 +0000 (06:25 +0900)]
Use correct span for Infer type inside closure header

7 years agoAdd a test for #1697
topecongiro [Fri, 16 Jun 2017 09:58:15 +0000 (18:58 +0900)]
Add a test for #1697

7 years agoUpdate tests
topecongiro [Fri, 16 Jun 2017 09:56:38 +0000 (18:56 +0900)]
Update tests

7 years agoFormat source codes
topecongiro [Fri, 16 Jun 2017 09:56:32 +0000 (18:56 +0900)]
Format source codes

7 years agoUse special rules when overflowing the last argument
topecongiro [Fri, 16 Jun 2017 09:53:21 +0000 (18:53 +0900)]
Use special rules when overflowing the last argument

When overflowing the last argument of function call, if it is a closure,
we apply some special rules in order to avoid weird formatting.

7 years agoUse correct budget for function call args
topecongiro [Fri, 16 Jun 2017 09:52:46 +0000 (18:52 +0900)]
Use correct budget for function call args

7 years agoMerge pull request #1705 from topecongiro/issue-1703
Nick Cameron [Sat, 17 Jun 2017 04:58:11 +0000 (16:58 +1200)]
Merge pull request #1705 from topecongiro/issue-1703

Preserve comments inside attributes

7 years agoMerge pull request #1698 from topecongiro/vec-semi
Nick Cameron [Sat, 17 Jun 2017 04:55:43 +0000 (16:55 +1200)]
Merge pull request #1698 from topecongiro/vec-semi

Use correct indentaion for vec! with semicolon

7 years agoPreserve comments inside attributes
topecongiro [Fri, 16 Jun 2017 20:44:54 +0000 (05:44 +0900)]
Preserve comments inside attributes

7 years agoUse correct indentaion for vec! with semicolon
topecongiro [Fri, 16 Jun 2017 04:57:37 +0000 (13:57 +0900)]
Use correct indentaion for vec! with semicolon

7 years agonightly-0.1.3
Nick Cameron [Fri, 16 Jun 2017 04:50:53 +0000 (16:50 +1200)]
nightly-0.1.3

7 years agoConfig knows if an option was default or set
Nick Cameron [Fri, 16 Jun 2017 04:49:54 +0000 (16:49 +1200)]
Config knows if an option was default or set

7 years agoMerge pull request #1692 from topecongiro/chain/last-item
Nick Cameron [Fri, 16 Jun 2017 01:24:03 +0000 (13:24 +1200)]
Merge pull request #1692 from topecongiro/chain/last-item

Allow overflowing the last item of chain only if it is multi-lined

7 years agoMerge pull request #1688 from topecongiro/overflow-closure
Nick Cameron [Fri, 16 Jun 2017 01:05:57 +0000 (13:05 +1200)]
Merge pull request #1688 from topecongiro/overflow-closure

Wrap closure in block with a single control flow expr with multi line condition

7 years agoUpdate README for running the nightly version
Nick Cameron [Fri, 16 Jun 2017 00:00:43 +0000 (12:00 +1200)]
Update README for running the nightly version

7 years agoFormat source codes
topecongiro [Thu, 15 Jun 2017 23:49:49 +0000 (08:49 +0900)]
Format source codes

7 years agoAllow overflowing the last item of chain only if it is multi-lined
topecongiro [Thu, 15 Jun 2017 23:47:33 +0000 (08:47 +0900)]
Allow overflowing the last item of chain only if it is multi-lined

By multi-lined we mean if it has more than 3 lines.

7 years agoAdd and remove comments
topecongiro [Thu, 15 Jun 2017 23:28:12 +0000 (08:28 +0900)]
Add and remove comments

7 years agoFormat source codes and add a test
topecongiro [Thu, 15 Jun 2017 14:29:46 +0000 (23:29 +0900)]
Format source codes and add a test