Skip to content

Commit c7352c7

Browse files
committed
(chore): Update semver crate
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
1 parent e966625 commit c7352c7

File tree

3 files changed

+6
-33
lines changed

3 files changed

+6
-33
lines changed

Cargo.lock

Lines changed: 2 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ regex = "1"
4949
remove_dir_all = "0.7.0"
5050
same-file = "1"
5151
scopeguard = "1"
52-
semver = "0.11"
52+
semver = "1.0"
5353
serde = {version = "1.0", features = ["derive"]}
5454
sequoia-openpgp = { version = "1.5", default-features = false, features = ["crypto-rust", "allow-experimental-crypto", "allow-variable-time-crypto"] }
5555
sha2 = "0.10"

src/utils/utils.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -537,15 +537,15 @@ pub(crate) fn format_path_for_display(path: &str) -> String {
537537
}
538538

539539
pub(crate) fn toolchain_sort<T: AsRef<str>>(v: &mut [T]) {
540-
use semver::{Identifier, Version};
540+
use semver::{BuildMetadata, Prerelease, Version};
541541

542542
fn special_version(ord: u64, s: &str) -> Version {
543543
Version {
544544
major: 0,
545545
minor: 0,
546546
patch: 0,
547-
pre: vec![Identifier::Numeric(ord), Identifier::AlphaNumeric(s.into())],
548-
build: vec![],
547+
pre: Prerelease::new(&format!("pre.{}.{}", ord, s.replace('_', "-"))).unwrap(),
548+
build: BuildMetadata::EMPTY,
549549
}
550550
}
551551

0 commit comments

Comments
 (0)