Use to_string() instead of format!("{}", ...).

This commit is contained in:
Dan Gohman
2018-06-04 16:27:09 -07:00
parent 22a7c56108
commit 4a4453dc47
2 changed files with 3 additions and 3 deletions

View File

@@ -59,7 +59,7 @@ pub fn parse_sets_and_triple(
if let Some(triple_name) = words.next() {
let triple = match Triple::from_str(triple_name) {
Ok(triple) => triple,
Err(parse_error) => return Err(format!("{}", parse_error)),
Err(parse_error) => return Err(parse_error.to_string()),
};
let mut isa_builder = isa::lookup(triple).map_err(|err| match err {
isa::LookupError::SupportDisabled => {

View File

@@ -230,7 +230,7 @@ impl Backend for FaerieBackend {
to,
at: offset as usize,
})
.map_err(|e| ModuleError::Backend(format!("{}", e)))?;
.map_err(|e| ModuleError::Backend(e.to_string()))?;
}
for &(offset, id, addend) in data_relocs {
debug_assert_eq!(
@@ -244,7 +244,7 @@ impl Backend for FaerieBackend {
to,
at: offset as usize,
})
.map_err(|e| ModuleError::Backend(format!("{}", e)))?;
.map_err(|e| ModuleError::Backend(e.to_string()))?;
}
self.artifact