From 5edbe723f92b1598bb2d64d3ffecedffb6f7fc66 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 8 Nov 2023 10:30:05 +0100 Subject: [PATCH] fix(cargo): Allow `metadata` to be missing again This fixes a bug introduced by the port to kotlinx-serialization [1]. Resolves #7825. [1]: https://github.com/oss-review-toolkit/ort/pull/7709 Signed-off-by: Sebastian Schuberth --- plugins/package-managers/cargo/src/main/kotlin/CargoLockFile.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/package-managers/cargo/src/main/kotlin/CargoLockFile.kt b/plugins/package-managers/cargo/src/main/kotlin/CargoLockFile.kt index 347f3396134a5..fa5c999b57d90 100644 --- a/plugins/package-managers/cargo/src/main/kotlin/CargoLockFile.kt +++ b/plugins/package-managers/cargo/src/main/kotlin/CargoLockFile.kt @@ -32,7 +32,7 @@ internal data class CargoLockFile( @SerialName("package") val packages: List, - val metadata: Map + val metadata: Map = emptyMap() ) { /** * See https://docs.rs/cargo-lock/latest/cargo_lock/package/struct.Package.html.