rustfmt_nightly::utils

Function trim_left_preserve_layout

Source
pub(crate) fn trim_left_preserve_layout(
    orig: &str,
    indent: Indent,
    config: &Config,
) -> Option<String>
Expand description

Indent each line according to the specified indent. e.g.

foo!{
x,
y,
foo(
    a,
    b,
    c,
),
}

will become

foo!{
    x,
    y,
    foo(
        a,
        b,
        c,
    ),
}