We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eae6d51 commit 61e1fbcCopy full SHA for 61e1fbc
src/tools/compiletest/src/util.rs
@@ -75,16 +75,18 @@ pub fn matches_os(triple: &str, name: &str) -> bool {
75
if triple == "wasm32-unknown-unknown" {
76
return name == "emscripten" || name == "wasm32-bare"
77
}
78
+ let triple: Vec<_> = triple.split('-').collect();
79
for &(triple_os, os) in OS_TABLE {
- if triple.contains(triple_os) {
80
+ if triple.contains(&triple_os) {
81
return os == name;
82
83
84
panic!("Cannot determine OS from triple");
85
86
pub fn get_arch(triple: &str) -> &'static str {
87
88
for &(triple_arch, arch) in ARCH_TABLE {
- if triple.contains(triple_arch) {
89
+ if triple.contains(&triple_arch) {
90
return arch;
91
92
0 commit comments