Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
  • Loading branch information
NobodyXu committed Jan 4, 2023
1 parent bd69455 commit 8314cb3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/detect-targets/src/detect/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ fn is_arch_supported(arch: IMAGE_FILE_MACHINE) -> bool {
}

pub(super) fn detect_alternative_targets(target: &str) -> impl Iterator<Item = String> {
let (prefix, abi) = target.rsplit_once('-')?;
let (prefix, abi) = target
.rsplit_once('-')
.expect("unwrap: target always has a -");

// detect abi in ["gnu", "gnullvm", ...]
let msvc_fallback_target = (abi != "msvc").then(|| format!("{prefix}-msvc"));
Expand Down

0 comments on commit 8314cb3

Please sign in to comment.