diff --git a/util/src/hash.rs b/util/src/hash.rs index ba96f812c..1a16cefa4 100644 --- a/util/src/hash.rs +++ b/util/src/hash.rs @@ -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); diff --git a/util/src/json_aid.rs b/util/src/json_aid.rs index 6aed7f09c..7bf940b99 100644 --- a/util/src/json_aid.rs +++ b/util/src/json_aid.rs @@ -48,7 +48,7 @@ impl FromJson for Bytes { impl FromJson for BTreeMap { 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(), } } diff --git a/util/src/keys/store.rs b/util/src/keys/store.rs index 3ecabc07c..296f7ad37 100644 --- a/util/src/keys/store.rs +++ b/util/src/keys/store.rs @@ -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(); }