Use to_string() instead of format!("{}", ...).
This commit is contained in:
@@ -59,7 +59,7 @@ pub fn parse_sets_and_triple(
|
|||||||
if let Some(triple_name) = words.next() {
|
if let Some(triple_name) = words.next() {
|
||||||
let triple = match Triple::from_str(triple_name) {
|
let triple = match Triple::from_str(triple_name) {
|
||||||
Ok(triple) => triple,
|
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 {
|
let mut isa_builder = isa::lookup(triple).map_err(|err| match err {
|
||||||
isa::LookupError::SupportDisabled => {
|
isa::LookupError::SupportDisabled => {
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ impl Backend for FaerieBackend {
|
|||||||
to,
|
to,
|
||||||
at: offset as usize,
|
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 {
|
for &(offset, id, addend) in data_relocs {
|
||||||
debug_assert_eq!(
|
debug_assert_eq!(
|
||||||
@@ -244,7 +244,7 @@ impl Backend for FaerieBackend {
|
|||||||
to,
|
to,
|
||||||
at: offset as usize,
|
at: offset as usize,
|
||||||
})
|
})
|
||||||
.map_err(|e| ModuleError::Backend(format!("{}", e)))?;
|
.map_err(|e| ModuleError::Backend(e.to_string()))?;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.artifact
|
self.artifact
|
||||||
|
|||||||
Reference in New Issue
Block a user