aboutsummaryrefslogtreecommitdiff
path: root/src/decoder/rustc_serialize.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder/rustc_serialize.rs')
-rw-r--r--src/decoder/rustc_serialize.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decoder/rustc_serialize.rs b/src/decoder/rustc_serialize.rs
index 2f4fb09..f850663 100644
--- a/src/decoder/rustc_serialize.rs
+++ b/src/decoder/rustc_serialize.rs
@@ -171,7 +171,7 @@ impl rustc_serialize::Decoder for Decoder {
-> Result<T, DecodeError>
where F: FnOnce(&mut Decoder) -> Result<T, DecodeError>
{
- let field = format!("{}", f_name);
+ let field = f_name.to_string();
let toml = match self.toml {
Some(Value::Table(ref mut table)) => {
table.remove(&field)
@@ -324,7 +324,7 @@ impl rustc_serialize::Decoder for Decoder {
fn error(&mut self, err: &str) -> DecodeError {
DecodeError {
field: self.cur_field.clone(),
- kind: ApplicationError(format!("{}", err))
+ kind: ApplicationError(err.to_string())
}
}
}