rustfmt_nightly

Function format_snippet

source
pub(crate) fn format_snippet(
    snippet: &str,
    config: &Config,
    is_macro_def: bool,
) -> Option<FormattedSnippet>
Expand description

Format the given snippet. The snippet is expected to be complete code. When we cannot parse the given snippet, this function returns None.