Replaced LibCall's fmt::Display implementation

This commit is contained in:
Aaron Power
2018-09-23 02:41:11 +01:00
committed by Dan Gohman
parent 15a237520e
commit c187e7a345

View File

@@ -40,21 +40,9 @@ pub enum LibCall {
NearestF64,
}
const NAME: [&str; 9] = [
"Probestack",
"CeilF32",
"CeilF64",
"FloorF32",
"FloorF64",
"TruncF32",
"TruncF64",
"NearestF32",
"NearestF64",
];
impl fmt::Display for LibCall {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str(NAME[*self as usize])
fmt::Debug::fmt(self, f)
}
}