cranelift: Use requested ISA Flags in run tests (#4450)

This commit is contained in:
Afonso Bordado
2022-07-15 20:09:07 +01:00
committed by GitHub
parent 80976b6fc7
commit eca0a73453
12 changed files with 97 additions and 26 deletions

View File

@@ -113,6 +113,17 @@ impl Value {
_ => None,
}
}
/// Builds a string from the current value
pub fn value_string(&self) -> String {
match self.kind() {
SettingKind::Enum => self.as_enum().map(|b| b.to_string()),
SettingKind::Num => self.as_num().map(|b| b.to_string()),
SettingKind::Bool => self.as_bool().map(|b| b.to_string()),
SettingKind::Preset => unreachable!(),
}
.unwrap()
}
}
impl fmt::Display for Value {