Use write! in utility code, rather than calling write_function directly.

This commit is contained in:
Dan Gohman
2017-05-10 14:58:14 -07:00
committed by Jakob Stoklund Olesen
parent 6b4c28d554
commit ad9a942f52
3 changed files with 8 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
//! Utility functions.
use cretonne::ir::entities::AnyEntity;
use cretonne::{ir, verifier, write_function};
use cretonne::{ir, verifier};
use cretonne::result::CtonError;
use std::fmt::Write;
use std::fs::File;
@@ -42,7 +42,7 @@ pub fn pretty_verifier_error(func: &ir::Function, err: verifier::Error) -> Strin
}
_ => msg.push('\n'),
}
write_function(&mut msg, func, None).unwrap();
write!(msg, "{}", func).unwrap();
msg
}