about summary refs log tree commit diff
path: root/src/string.rs
diff options
context:
space:
mode:
authortopecongiro <seuchida@gmail.com>2017-05-24 00:06:23 +0900
committertopecongiro <seuchida@gmail.com>2017-05-24 00:06:23 +0900
commit92b54d6490fc638a136c07b42921ba7ff67743fa (patch)
tree7f419d83c7b0594d86e900f5a49861a7450a5eef /src/string.rs
parentec33121aafb081f33c78f062492cd61b77cef565 (diff)
Add heuristic when rewriting chain with a single child
rustfmt splits chain into multiline when the length of chain exceeds
`chain_one_line_max`. However, currenly this rule only applies when the chain
has more than one child. This can lead to unexpected long chain if the parent
is long. This commit adds heuristic that if the length of parent is longer
than the half of `chain_one_line_max` we use multiline even if there is
only a single child.
Diffstat (limited to 'src/string.rs')
0 files changed, 0 insertions, 0 deletions