Update doc comments in chains.rs
This commit is contained in:
parent
7359d3ad34
commit
923a7bc1d9
@ -24,6 +24,15 @@
|
|||||||
/// alignment).
|
/// alignment).
|
||||||
/// E.g., `let foo = { aaaa; bbb; ccc }.bar.baz();`, we would layout for the
|
/// E.g., `let foo = { aaaa; bbb; ccc }.bar.baz();`, we would layout for the
|
||||||
/// following values of `chain_indent`:
|
/// following values of `chain_indent`:
|
||||||
|
/// Block:
|
||||||
|
/// ```
|
||||||
|
/// let foo = {
|
||||||
|
/// aaaa;
|
||||||
|
/// bbb;
|
||||||
|
/// ccc
|
||||||
|
/// }.bar
|
||||||
|
/// .baz();
|
||||||
|
/// ```
|
||||||
/// Visual:
|
/// Visual:
|
||||||
/// ```
|
/// ```
|
||||||
/// let foo = {
|
/// let foo = {
|
||||||
@ -34,47 +43,21 @@
|
|||||||
/// .bar
|
/// .bar
|
||||||
/// .baz();
|
/// .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
|
/// If the first item in the chain is a block expression, we align the dots with
|
||||||
/// the braces.
|
/// the braces.
|
||||||
|
/// Block:
|
||||||
|
/// ```
|
||||||
|
/// let a = foo.bar
|
||||||
|
/// .baz()
|
||||||
|
/// .qux
|
||||||
|
/// ```
|
||||||
/// Visual:
|
/// Visual:
|
||||||
/// ```
|
/// ```
|
||||||
/// let a = foo.bar
|
/// let a = foo.bar
|
||||||
/// .baz()
|
/// .baz()
|
||||||
/// .qux
|
/// .qux
|
||||||
/// ```
|
/// ```
|
||||||
/// Inherit:
|
|
||||||
/// ```
|
|
||||||
/// let a = foo.bar
|
|
||||||
/// .baz()
|
|
||||||
/// .qux
|
|
||||||
/// ```
|
|
||||||
/// Tabbed:
|
|
||||||
/// ```
|
|
||||||
/// let a = foo.bar
|
|
||||||
/// .baz()
|
|
||||||
/// .qux
|
|
||||||
/// ```
|
|
||||||
|
|
||||||
use shape::Shape;
|
use shape::Shape;
|
||||||
use config::IndentStyle;
|
use config::IndentStyle;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user