expunge x! from util

This commit is contained in:
Robert Habermeier 2016-05-31 16:40:48 +02:00
parent b729a381f8
commit 3788b3a149
3 changed files with 3 additions and 3 deletions

View File

@ -718,7 +718,7 @@ mod tests {
#[test]
fn from_and_to_u256() {
let u: U256 = x!(0x123456789abcdef0u64);
let u: U256 = 0x123456789abcdef0u64.into();
let h = H256::from(u);
assert_eq!(H256::from(u), H256::from("000000000000000000000000000000000000000000000000123456789abcdef0"));
let h_ref = H256::from(&u);

View File

@ -48,7 +48,7 @@ impl FromJson for Bytes {
impl FromJson for BTreeMap<H256, H256> {
fn from_json(json: &Json) -> Self {
match *json {
Json::Object(ref o) => o.iter().map(|(key, value)| (x!(&u256_from_str(key)), x!(&U256::from_json(value)))).collect(),
Json::Object(ref o) => o.iter().map(|(key, value)| (u256_from_str(key).into(), U256::from_json(value).into())).collect(),
_ => BTreeMap::new(),
}
}

View File

@ -554,7 +554,7 @@ mod tests {
H256::from_str("517ead924a9d0dc3124507e3393d175ce3ff7c1e96529c6c555ce9e51205e9b2").unwrap(),
262144,
32));
key_file.account = Some(x!(i as u64));
key_file.account = Some((i as u64).into());
result.push(key_file.id.clone());
write_sstore.import_key(key_file).unwrap();
}