Use TempDir::path() instead of TempDir::into_path(); into_path() returns the underlying PathBuf and voids the promise to delete the directory when TempDir goes out of scope.
Use TempDir::path() instead of TempDir::into_path(); into_path() returns the underlying PathBuf and voids the promise to delete the directory when TempDir goes out of scope.