Skip to main content

rustfmt_in_place

Function rustfmt_in_place 

Source
pub fn rustfmt_in_place(path: &Path)
Expand description

Run rustfmt --edition 2021 against the Rust source file at path, formatting it in place.

Logs to stderr and continues on any failure — never panics or returns Err — so that codegen keeps working in environments without rustfmt on PATH. Call only for .rs files; it is a no-op for other extensions.