From b06d6a22a95263521348ab5b16e713ec581ed454 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Sat, 9 Nov 2024 12:31:28 +1100 Subject: [PATCH] Fix parsing semver number in entry.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- crates/bin/src/entry.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/bin/src/entry.rs b/crates/bin/src/entry.rs index 210b1560..270c9d99 100644 --- a/crates/bin/src/entry.rs +++ b/crates/bin/src/entry.rs @@ -616,9 +616,9 @@ pub fn self_install( name: CompactString::const_new("cargo-binstall"), version_req: CompactString::const_new("*"), current_version: Version::new( - env!("CARGO_PKG_VERSION_MAJOR").try_into().unwrap(), - env!("CARGO_PKG_VERSION_MINOR").try_into().unwrap(), - env!("CARGO_PKG_VERSION_PATCH").try_into().unwrap(), + env!("CARGO_PKG_VERSION_MAJOR").parse().unwrap(), + env!("CARGO_PKG_VERSION_MINOR").parse().unwrap(), + env!("CARGO_PKG_VERSION_PATCH").parse().unwrap(), ), source: CrateSource::cratesio_registry(), target: CompactString::const_new(TARGET),