Skip to content

Commit 913e2b4

Browse files
committed
Make it work with older versions of Rust.
rsplit_once was introduced in rustc v1.52.
1 parent bf6efea commit 913e2b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3616,8 +3616,8 @@ static NEW_STANDALONE_ANDROID_COMPILERS: [&str; 4] = [
36163616
fn android_clang_compiler_uses_target_arg_internally(clang_path: &Path) -> bool {
36173617
if let Some(filename) = clang_path.file_name() {
36183618
if let Some(filename_str) = filename.to_str() {
3619-
if let Some((target, _)) = filename_str.rsplit_once("-") {
3620-
return target.contains("android");
3619+
if let Some(idx) = filename_str.rfind("-") {
3620+
return filename_str.split_at(idx).0.contains("android");
36213621
}
36223622
}
36233623
}

0 commit comments

Comments
 (0)