summaryrefslogtreecommitdiffstats
path: root/vendor/spdx-rs/src/parsers
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/parsers
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/parsers')
-rw-r--r--vendor/spdx-rs/src/parsers/mod.rs4
-rw-r--r--vendor/spdx-rs/src/parsers/tag_value.rs8
2 files changed, 6 insertions, 6 deletions
diff --git a/vendor/spdx-rs/src/parsers/mod.rs b/vendor/spdx-rs/src/parsers/mod.rs
index 59ce03bae..48c863fca 100644
--- a/vendor/spdx-rs/src/parsers/mod.rs
+++ b/vendor/spdx-rs/src/parsers/mod.rs
@@ -777,7 +777,7 @@ mod test_super {
.contains(&"Person: Jane Doe ()".to_string()));
assert_eq!(
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()
);
assert_eq!(
document_creation_information.creation_info.creator_comment,
@@ -1050,7 +1050,7 @@ THE SOFTWARE IS PROVIDED �AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMP
annotations[2],
Annotation::new(
"Person: Suzanne Reviewer".to_string(),
- Utc.ymd(2011, 3, 13).and_hms(0, 0, 0),
+ Utc.with_ymd_and_hms(2011, 3, 13, 0, 0, 0).unwrap(),
AnnotationType::Review,
Some("SPDXRef-DOCUMENT".to_string()),
"Another example reviewer.".to_string()
diff --git a/vendor/spdx-rs/src/parsers/tag_value.rs b/vendor/spdx-rs/src/parsers/tag_value.rs
index 0c8fdb4e3..765348d2f 100644
--- a/vendor/spdx-rs/src/parsers/tag_value.rs
+++ b/vendor/spdx-rs/src/parsers/tag_value.rs
@@ -273,7 +273,7 @@ fn file_type(i: &str) -> IResult<&str, FileType, VerboseError<&str>> {
}
}
-fn document_ref<'a>(i: &'a str) -> IResult<&'a str, &str, VerboseError<&'a str>> {
+fn document_ref(i: &str) -> IResult<&str, &str, VerboseError<&str>> {
preceded(tag("DocumentRef-"), ws(idstring))(i)
}
@@ -395,7 +395,7 @@ fn range(i: &str) -> IResult<&str, (i32, i32), VerboseError<&str>> {
)(i)
}
-fn idstring<'a>(i: &'a str) -> IResult<&'a str, &str, VerboseError<&'a str>> {
+fn idstring(i: &str) -> IResult<&str, &str, VerboseError<&str>> {
take_while(|c: char| c.is_alphanum() || c == '.' || c == '-' || c == '+')(i)
}
@@ -427,7 +427,7 @@ fn tv_comment(i: &str) -> IResult<&str, Atom, VerboseError<&str>> {
})(i)
}
-fn tag_value<'a>(i: &'a str) -> IResult<&'a str, (&str, &str), VerboseError<&'a str>> {
+fn tag_value(i: &str) -> IResult<&str, (&str, &str), VerboseError<&str>> {
separated_pair(
ws(alphanumeric0),
tag(":"),
@@ -435,7 +435,7 @@ fn tag_value<'a>(i: &'a str) -> IResult<&'a str, (&str, &str), VerboseError<&'a
)(i)
}
-fn multiline_text<'a>(i: &'a str) -> IResult<&'a str, &str, VerboseError<&'a str>> {
+fn multiline_text(i: &str) -> IResult<&str, &str, VerboseError<&str>> {
delimited(tag("<text>"), take_until("</text>"), tag("</text>"))(i)
}