finalize_temp_file

Function finalize_temp_file 

Source
pub fn finalize_temp_file(
    temp_path: &Path,
    final_path: &Path,
) -> Result<(), Box<FsError>>
Expand description

Replaces final_path with temp_path, removing any existing target first.

If this helper is called directly and the rename fails, the caller remains responsible for cleaning up temp_path.