Skip to content

Commit a3ffa56

Browse files
authored
Fix parse deprecation issues (#505)
1 parent 2bab576 commit a3ffa56

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

vergen-git2/src/git2/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ impl Git2 {
832832
cargo_warning,
833833
);
834834
} else {
835-
let format = format_description::parse("[year]-[month]-[day]")?;
835+
let format = format_description::parse_borrowed::<1>("[year]-[month]-[day]")?;
836836
add_map_entry(
837837
VergenKey::GitCommitDate,
838838
ts.format(&format)?,

vergen-gitcl/src/gitcl/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ impl Gitcl {
872872
}
873873
} else {
874874
if self.commit_date && !date_override {
875-
let format = format_description::parse("[year]-[month]-[day]")?;
875+
let format = format_description::parse_borrowed::<1>("[year]-[month]-[day]")?;
876876
add_map_entry(
877877
VergenKey::GitCommitDate,
878878
ts.format(&format)?,

vergen-gix/src/gix/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ impl Gix {
730730
cargo_warning,
731731
);
732732
} else {
733-
let format = format_description::parse("[year]-[month]-[day]")?;
733+
let format = format_description::parse_borrowed::<1>("[year]-[month]-[day]")?;
734734
add_map_entry(
735735
VergenKey::GitCommitDate,
736736
ts.format(&format)?,

vergen/src/feature/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ impl Build {
240240
cargo_warning,
241241
);
242242
} else {
243-
let format = format_description::parse("[year]-[month]-[day]")?;
243+
let format = format_description::parse_borrowed::<1>("[year]-[month]-[day]")?;
244244
add_map_entry(VergenKey::BuildDate, ts.format(&format)?, cargo_rustc_env);
245245
}
246246
}

0 commit comments

Comments
 (0)