diff --git a/rust2rpm/__main__.py b/rust2rpm/__main__.py index 65a9491..aa8846f 100644 --- a/rust2rpm/__main__.py +++ b/rust2rpm/__main__.py @@ -255,10 +255,9 @@ def make_diff_metadata(crate, version, patch=False, store=False): else: cratef, crate, version = download(crate, version) - with files_from_crate(cratef, crate, version) as files: - diff = make_patch(files[0], enabled=patch) - metadata = Metadata.from_file(files[0]) - doc_files, license_files = files[1:3] + with files_from_crate(cratef, crate, version) as (toml, doc_files, license_files): + diff = make_patch(toml, enabled=patch) + metadata = Metadata.from_file(toml) if store: shutil.copy2(cratef, os.path.join(os.getcwd(), f"{metadata.name}-{version}.crate")) return crate, diff, metadata, doc_files, license_files