pub fn edit_formatted_file(
path: &Path,
original_contents: Option<&[u8]>,
rewritten_contents: Option<&[u8]>,
updated_contents: Option<&[u8]>,
allow_generated: bool,
allow_reformatting: bool,
) -> Result<bool, EditorError>Expand description
Edit a formatted file.
§Arguments
path- Path to the fileoriginal_contents- The original contents of the filerewritten_contents- The contents rewritten with our parser/serializerupdated_contents- Updated contents rewritten with our parser/serializer after changes were madeallow_generated- Do not raiseGeneratedFilewhen encountering a generated fileallow_reformatting- Whether to allow reformatting of the file
§Returns
true if the file was changed, false otherwise