Function rustfmt_core::format_snippet [] [src]

pub fn format_snippet(snippet: &str, config: &Config) -> Option<String>

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