summaryrefslogtreecommitdiffstats
path: root/vendor/spdx-rs/src/models
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/spdx-rs/src/models
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/spdx-rs/src/models')
-rw-r--r--vendor/spdx-rs/src/models/annotation.rs6
-rw-r--r--vendor/spdx-rs/src/models/checksum.rs4
-rw-r--r--vendor/spdx-rs/src/models/document_creation_information.rs8
-rw-r--r--vendor/spdx-rs/src/models/file_information.rs4
-rw-r--r--vendor/spdx-rs/src/models/other_licensing_information_detected.rs2
-rw-r--r--vendor/spdx-rs/src/models/package_information.rs8
-rw-r--r--vendor/spdx-rs/src/models/snippet.rs6
-rw-r--r--vendor/spdx-rs/src/models/spdx_document.rs2
8 files changed, 20 insertions, 20 deletions
diff --git a/vendor/spdx-rs/src/models/annotation.rs b/vendor/spdx-rs/src/models/annotation.rs
index f5396aa1d..6e82b6274 100644
--- a/vendor/spdx-rs/src/models/annotation.rs
+++ b/vendor/spdx-rs/src/models/annotation.rs
@@ -6,7 +6,7 @@ use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
/// <https://spdx.github.io/spdx-spec/8-annotations/>
-#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
+#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)]
#[serde(rename_all = "camelCase")]
pub struct Annotation {
/// <https://spdx.github.io/spdx-spec/8-annotations/#81-annotator>
@@ -47,7 +47,7 @@ impl Annotation {
}
/// <https://spdx.github.io/spdx-spec/8-annotations/#83-annotation-type>
-#[derive(Serialize, Deserialize, Debug, PartialEq, Clone, Copy)]
+#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone, Copy)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum AnnotationType {
Review,
@@ -84,7 +84,7 @@ mod test {
.unwrap();
assert_eq!(
spdx_file.annotations[0].annotation_date,
- Utc.ymd(2010, 1, 29).and_hms(18, 30, 22)
+ Utc.with_ymd_and_hms(2010, 1, 29, 18, 30, 22).unwrap()
);
}
diff --git a/vendor/spdx-rs/src/models/checksum.rs b/vendor/spdx-rs/src/models/checksum.rs
index bd91f4c7a..f8e2bc258 100644
--- a/vendor/spdx-rs/src/models/checksum.rs
+++ b/vendor/spdx-rs/src/models/checksum.rs
@@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize};
/// and
/// [File Checksum](https://spdx.github.io/spdx-spec/4-file-information/#44-file-checksum).
/// According to the spec, SHA1 is mandatory but we don't currently enforce that.
-#[derive(Debug, Serialize, Deserialize, PartialEq, PartialOrd, Clone)]
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Clone)]
pub struct Checksum {
/// Algorithm used to calculate the checksum
pub algorithm: Algorithm,
@@ -32,7 +32,7 @@ impl Checksum {
/// Possible algorithms to be used for SPDX's
/// [package checksum](https://spdx.github.io/spdx-spec/3-package-information/#310-package-checksum)
/// and [file checksum](https://spdx.github.io/spdx-spec/4-file-information/#44-file-checksum).
-#[derive(Debug, Serialize, Deserialize, PartialEq, PartialOrd, Clone, Copy)]
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Clone, Copy)]
pub enum Algorithm {
SHA1,
SHA224,
diff --git a/vendor/spdx-rs/src/models/document_creation_information.rs b/vendor/spdx-rs/src/models/document_creation_information.rs
index 610803354..6a3c01e66 100644
--- a/vendor/spdx-rs/src/models/document_creation_information.rs
+++ b/vendor/spdx-rs/src/models/document_creation_information.rs
@@ -10,7 +10,7 @@ use super::Checksum;
/// ## Document Creation Information
///
/// SPDX's [Document Creation Information](https://spdx.github.io/spdx-spec/2-document-creation-information/)
-#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
+#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct DocumentCreationInformation {
/// <https://spdx.github.io/spdx-spec/2-document-creation-information/#21-spdx-version>
@@ -69,7 +69,7 @@ impl Default for DocumentCreationInformation {
}
}
-#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
+#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct CreationInfo {
/// <https://spdx.github.io/spdx-spec/2-document-creation-information/#27-license-list-version>
@@ -104,7 +104,7 @@ impl Default for CreationInfo {
}
/// <https://spdx.github.io/spdx-spec/2-document-creation-information/#26-external-document-references>
-#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, PartialOrd)]
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd)]
pub struct ExternalDocumentReference {
/// Unique ID string of the reference.
#[serde(rename = "externalDocumentId")]
@@ -236,7 +236,7 @@ mod test {
.unwrap();
assert_eq!(
spdx.document_creation_information.creation_info.created,
- Utc.ymd(2010, 1, 29).and_hms(18, 30, 22)
+ Utc.with_ymd_and_hms(2010, 1, 29, 18, 30, 22).unwrap()
);
}
#[test]
diff --git a/vendor/spdx-rs/src/models/file_information.rs b/vendor/spdx-rs/src/models/file_information.rs
index f2db6e030..aba2defe7 100644
--- a/vendor/spdx-rs/src/models/file_information.rs
+++ b/vendor/spdx-rs/src/models/file_information.rs
@@ -10,7 +10,7 @@ use super::{Algorithm, Checksum};
/// ## File Information
///
/// SPDX's [File Information](https://spdx.github.io/spdx-spec/4-file-information/)
-#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
+#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct FileInformation {
/// <https://spdx.github.io/spdx-spec/4-file-information/#41-file-name>
@@ -127,7 +127,7 @@ impl FileInformation {
}
/// <https://spdx.github.io/spdx-spec/4-file-information/#43-file-type>
-#[derive(Debug, Serialize, Deserialize, PartialEq, PartialOrd, Clone, Copy)]
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Clone, Copy)]
#[serde(rename_all = "UPPERCASE")]
pub enum FileType {
Source,
diff --git a/vendor/spdx-rs/src/models/other_licensing_information_detected.rs b/vendor/spdx-rs/src/models/other_licensing_information_detected.rs
index 30bd1d318..28ba8b683 100644
--- a/vendor/spdx-rs/src/models/other_licensing_information_detected.rs
+++ b/vendor/spdx-rs/src/models/other_licensing_information_detected.rs
@@ -5,7 +5,7 @@
use serde::{Deserialize, Serialize};
/// <https://spdx.github.io/spdx-spec/6-other-licensing-information-detected/>
-#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq)]
+#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct OtherLicensingInformationDetected {
/// <https://spdx.github.io/spdx-spec/6-other-licensing-information-detected/#61-license-identifier>
diff --git a/vendor/spdx-rs/src/models/package_information.rs b/vendor/spdx-rs/src/models/package_information.rs
index 1cfd938f8..c5d73fb3f 100644
--- a/vendor/spdx-rs/src/models/package_information.rs
+++ b/vendor/spdx-rs/src/models/package_information.rs
@@ -12,7 +12,7 @@ use super::{Checksum, FileInformation};
/// ## Package Information
///
/// SPDX's [Package Information](https://spdx.github.io/spdx-spec/3-package-information/).
-#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
+#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct PackageInformation {
/// <https://spdx.github.io/spdx-spec/3-package-information/#31-package-name>
@@ -203,7 +203,7 @@ impl PackageInformation {
}
/// <https://spdx.github.io/spdx-spec/3-package-information/#39-package-verification-code>
-#[derive(Debug, Serialize, Deserialize, PartialEq, PartialOrd, Clone)]
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Clone)]
pub struct PackageVerificationCode {
/// Value of the verification code.
#[serde(rename = "packageVerificationCodeValue")]
@@ -225,7 +225,7 @@ impl PackageVerificationCode {
}
/// <https://spdx.github.io/spdx-spec/3-package-information/#321-external-reference>
-#[derive(Serialize, Deserialize, Debug, PartialEq, PartialOrd, Clone)]
+#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, PartialOrd, Clone)]
#[serde(rename_all = "camelCase")]
pub struct ExternalPackageReference {
pub reference_category: ExternalPackageReferenceCategory,
@@ -254,7 +254,7 @@ impl ExternalPackageReference {
}
/// <https://spdx.github.io/spdx-spec/3-package-information/#321-external-reference>
-#[derive(Serialize, Deserialize, Debug, PartialEq, PartialOrd, Clone)]
+#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, PartialOrd, Clone)]
#[serde(rename_all = "SCREAMING-KEBAB-CASE")]
pub enum ExternalPackageReferenceCategory {
Security,
diff --git a/vendor/spdx-rs/src/models/snippet.rs b/vendor/spdx-rs/src/models/snippet.rs
index e4a644ac5..7585a0087 100644
--- a/vendor/spdx-rs/src/models/snippet.rs
+++ b/vendor/spdx-rs/src/models/snippet.rs
@@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize};
use spdx_expression::SpdxExpression;
/// <https://spdx.github.io/spdx-spec/5-snippet-information/>
-#[derive(Serialize, Deserialize, Debug, PartialEq, Clone, Default)]
+#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone, Default)]
pub struct Snippet {
/// <https://spdx.github.io/spdx-spec/5-snippet-information/#51-snippet-spdx-identifier>
#[serde(rename = "SPDXID")]
@@ -61,7 +61,7 @@ pub struct Snippet {
}
/// <https://spdx.github.io/spdx-spec/5-snippet-information/#53-snippet-byte-range>
-#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
+#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)]
#[serde(rename_all = "camelCase")]
pub struct Range {
pub start_pointer: Pointer,
@@ -77,7 +77,7 @@ impl Range {
}
}
-#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
+#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)]
#[serde(untagged)]
pub enum Pointer {
Byte {
diff --git a/vendor/spdx-rs/src/models/spdx_document.rs b/vendor/spdx-rs/src/models/spdx_document.rs
index d7db1009a..df619e5dc 100644
--- a/vendor/spdx-rs/src/models/spdx_document.rs
+++ b/vendor/spdx-rs/src/models/spdx_document.rs
@@ -37,7 +37,7 @@ use super::{
/// [Serde]: https://serde.rs
/// [review information]: https://spdx.github.io/spdx-spec/review-information-deprecated/
/// [tag-value format]: https://spdx.github.io/spdx-spec/conformance/
-#[derive(Serialize, Deserialize, Debug, PartialEq)]
+#[derive(Serialize, Deserialize, Debug, PartialEq, Eq)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct SPDX {
/// <https://spdx.github.io/spdx-spec/2-document-creation-information/>