Function rustfmt_nightly::formatting::newline_style::apply_newline_style [−][src]
pub(crate) fn apply_newline_style(
newline_style: NewlineStyle,
formatted_text: &mut String,
raw_input_text: &str
)Expand description
Apply this newline style to the formatted text. When the style is set
to Auto, the raw_input_text is used to detect the existing line
endings.
If the style is set to Auto and raw_input_text contains no
newlines, the Native style will be used.