Module rustfmt_nightly::utils

source ·

Macros

Traits

NodeIdExt 🔒

Functions

Returns the number of LF and CRLF respectively.
The width of the first line in s.
Based on the given line, determine if the next line can be indented or not. This allows to preserve the indentation of multi-line literals when re-inserted a code block that has been formatted separately from the rest of the code, such as code in macro defs or code blocks doc comments.
is_skip 🔒
The total used width of the last line.
The width of the last line in s.
mk_sp 🔒
Removes trailing spaces from the specified snippet. We do not remove spaces inside strings or comments.
stmt_expr 🔒
Indent each line according to the specified indent. e.g.
wrap_str 🔒