pub fn replace_file(tmp_path: &Path, path: &Path) -> Result<()>
Replace path with tmp_path (tmp is consumed). Works on Windows where rename cannot overwrite an existing destination.
path
tmp_path
rename