Merge branch 'master' of github.com:ethcore/parity into move_hash

This commit is contained in:
debris
2016-08-09 09:58:18 +02:00
43 changed files with 922 additions and 586 deletions

View File

@@ -48,10 +48,10 @@ macro_rules! impl_hash {
0 => $inner::from(0),
2 if value == "0x" => $inner::from(0),
_ if value.starts_with("0x") => try!($inner::from_str(&value[2..]).map_err(|_| {
Error::custom(format!("Invalid hex value {}.", value).as_ref())
Error::custom(format!("Invalid hex value {}.", value).as_str())
})),
_ => try!($inner::from_str(value).map_err(|_| {
Error::custom(format!("Invalid hex value {}.", value).as_ref())
Error::custom(format!("Invalid hex value {}.", value).as_str())
}))
};

View File

@@ -70,10 +70,10 @@ impl Visitor for UintVisitor {
0 => U256::from(0),
2 if value.starts_with("0x") => U256::from(0),
_ if value.starts_with("0x") => try!(U256::from_str(&value[2..]).map_err(|_| {
Error::custom(format!("Invalid hex value {}.", value).as_ref())
Error::custom(format!("Invalid hex value {}.", value).as_str())
})),
_ => try!(U256::from_dec_str(value).map_err(|_| {
Error::custom(format!("Invalid decimal value {}.", value).as_ref())
Error::custom(format!("Invalid decimal value {}.", value).as_str())
}))
};