Update doc comments in chains.rs

This commit is contained in:
Seiichi Uchida 2017-10-07 22:31:38 +09:00
parent 7359d3ad34
commit 923a7bc1d9

View File

@ -24,6 +24,15 @@
/// alignment).
/// E.g., `let foo = { aaaa; bbb; ccc }.bar.baz();`, we would layout for the
/// following values of `chain_indent`:
/// Block:
/// ```
/// let foo = {
/// aaaa;
/// bbb;
/// ccc
/// }.bar
/// .baz();
/// ```
/// Visual:
/// ```
/// let foo = {
@ -34,47 +43,21 @@
/// .bar
/// .baz();
/// ```
/// Inherit:
/// ```
/// let foo = {
/// aaaa;
/// bbb;
/// ccc
/// }
/// .bar
/// .baz();
/// ```
/// Tabbed:
/// ```
/// let foo = {
/// aaaa;
/// bbb;
/// ccc
/// }
/// .bar
/// .baz();
/// ```
///
/// If the first item in the chain is a block expression, we align the dots with
/// the braces.
/// Block:
/// ```
/// let a = foo.bar
/// .baz()
/// .qux
/// ```
/// Visual:
/// ```
/// let a = foo.bar
/// .baz()
/// .qux
/// ```
/// Inherit:
/// ```
/// let a = foo.bar
/// .baz()
/// .qux
/// ```
/// Tabbed:
/// ```
/// let a = foo.bar
/// .baz()
/// .qux
/// ```
use shape::Shape;
use config::IndentStyle;