From e38b55fe67db4b8d0a5a909e1c5635b2654d9948 Mon Sep 17 00:00:00 2001 From: Adam Spofford <93943719+adamspofford-dfinity@users.noreply.github.com> Date: Thu, 31 Oct 2024 06:58:47 -0700 Subject: [PATCH] fix: update canister hyphen handling for old versions of cargo (#3969) --- src/dfx/src/lib/canister_info/rust.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dfx/src/lib/canister_info/rust.rs b/src/dfx/src/lib/canister_info/rust.rs index a3b7266c26..22ce219e04 100644 --- a/src/dfx/src/lib/canister_info/rust.rs +++ b/src/dfx/src/lib/canister_info/rust.rs @@ -64,7 +64,7 @@ impl CanisterInfoFactory for RustCanisterInfo { }; let mut candidate_targets = package_info.targets.iter().filter(|x| { x.crate_types.iter().any(|c| { - (c == "cdylib" && x.name == crate_name.replace('-', "_")) + (c == "cdylib" && x.name.replace('-', "_") == crate_name.replace('-', "_")) || (c == "bin" && x.name == crate_name) }) });