Remove all unwrap calls from the resolver (#5426)

This commit is contained in:
Charlie Marsh 2023-06-28 14:06:17 -04:00 committed by GitHub
parent 4d90a5a9bc
commit 864f50a3a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 50 deletions

View file

@ -55,14 +55,7 @@ pub(crate) fn find(dir_path: &Path, exclusions: &[&Path]) -> BTreeMap<String, Im
let file_stem = path.file_stem().and_then(OsStr::to_str);
let is_native_lib = false;
(file_stem, is_native_lib)
} else if native_module::is_native_module_file_extension(extension)
&& !path
.with_extension(format!("{}.py", extension.to_str().unwrap()))
.exists()
&& !path
.with_extension(format!("{}.pyi", extension.to_str().unwrap()))
.exists()
{
} else if native_module::is_native_module_file_extension(extension) {
// E.g., `foo.abi3.so` becomes `foo`.
let file_stem = native_module::native_module_name(&path);
let is_native_lib = true;