Skip to content

Commit b55ee07

Browse files
committed
Fix case-sensitive extension check
1 parent dd948f3 commit b55ee07

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/compile-test.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ fn third_party_crates() -> String {
4444
};
4545
if let Some(name) = path.file_name().and_then(OsStr::to_str) {
4646
for dep in CRATES {
47-
if name.starts_with(&format!("lib{}-", dep)) && name.ends_with(".rlib") {
47+
if name.starts_with(&format!("lib{}-", dep))
48+
&& name.rsplit('.').next().map(|ext| ext.eq_ignore_ascii_case("rlib")) == Some(true)
49+
{
4850
if let Some(old) = crates.insert(dep, path.clone()) {
4951
panic!("Found multiple rlibs for crate `{}`: `{:?}` and `{:?}", dep, old, path);
5052
}

0 commit comments

Comments
 (0)