diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
commit | dc0db358abe19481e475e10c32149b53370f1a1c (patch) | |
tree | ab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/spdx-rs/src/models/spdx_document.rs | |
parent | Releasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip |
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/spdx-rs/src/models/spdx_document.rs')
-rw-r--r-- | vendor/spdx-rs/src/models/spdx_document.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vendor/spdx-rs/src/models/spdx_document.rs b/vendor/spdx-rs/src/models/spdx_document.rs index df619e5dc..385685086 100644 --- a/vendor/spdx-rs/src/models/spdx_document.rs +++ b/vendor/spdx-rs/src/models/spdx_document.rs @@ -155,9 +155,11 @@ impl SPDX { let mut license_ids = HashSet::new(); for file in &self.file_information { - for license in &file.concluded_license.identifiers() { - if license != "NOASSERTION" && license != "NONE" { - license_ids.insert(license.clone()); + if let Some(concluded_license) = &file.concluded_license { + for license in concluded_license.identifiers() { + if license != "NOASSERTION" && license != "NONE" { + license_ids.insert(license.clone()); + } } } } @@ -228,7 +230,7 @@ mod test { assert_eq!( file.0.concluded_license, - SpdxExpression::parse("LicenseRef-1").unwrap() + Some(SpdxExpression::parse("LicenseRef-1").unwrap()) ); } |