Skip to content

Commit

Permalink
Fix panic when parsing ABI tag on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashley Anderson committed Nov 16, 2021
1 parent 52301f0 commit 97439a3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pyo3-build-config/src/impl_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ print("mingw", get_platform().startswith("mingw"))
let abi_tag = soabi
.split('-')
.nth(1)
.map(ToString::to_string)
.expect("unable to parse ABI tag from SOABI");
.map(ToString::to_string);
let ext_suffix = map["ext_suffix"].to_string();

let implementation = map["implementation"].parse()?;
Expand Down Expand Up @@ -282,7 +281,7 @@ print("mingw", get_platform().startswith("mingw"))
shared,
abi3,
abi_flags: Some(abi_flags),
abi_tag: Some(abi_tag),
abi_tag,
ext_suffix: Some(ext_suffix),
lib_name: Some(lib_name),
lib_dir,
Expand Down

0 comments on commit 97439a3

Please sign in to comment.