[dependencies]: unify rustc-hex (#11506)
* [dependency]: unify `rustc-hex` * [private tx]: fix upgrade to `rustc hex 2.1.0`
This commit is contained in:
@@ -26,6 +26,10 @@ extern crate log;
|
||||
#[macro_use]
|
||||
extern crate static_assertions;
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate hex_literal;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate rustc_hex;
|
||||
|
||||
@@ -35,6 +39,7 @@ extern crate serde_json;
|
||||
#[cfg(test)]
|
||||
extern crate tempdir;
|
||||
|
||||
|
||||
#[cfg(feature = "bench")]
|
||||
pub mod compute;
|
||||
#[cfg(not(feature = "bench"))]
|
||||
|
||||
@@ -431,7 +431,7 @@ mod test {
|
||||
use super::*;
|
||||
|
||||
fn h256(hex: &str) -> H256 {
|
||||
let bytes = FromHex::from_hex(hex).unwrap();
|
||||
let bytes: Vec<u8> = FromHex::from_hex(hex).unwrap();
|
||||
let mut res = [0; 32];
|
||||
res.copy_from_slice(&bytes);
|
||||
res
|
||||
@@ -549,8 +549,8 @@ mod test {
|
||||
&c_dag,
|
||||
);
|
||||
|
||||
let expected_digest = FromHex::from_hex("b3bad9ca6f7c566cf0377d1f8cce29d6516a96562c122d924626281ec948ef02").unwrap();
|
||||
let expected_result = FromHex::from_hex("f4ac202715ded4136e72887c39e63a4738331c57fd9eb79f6ec421c281aa8743").unwrap();
|
||||
let expected_digest = hex!("b3bad9ca6f7c566cf0377d1f8cce29d6516a96562c122d924626281ec948ef02");
|
||||
let expected_result = hex!("f4ac202715ded4136e72887c39e63a4738331c57fd9eb79f6ec421c281aa8743");
|
||||
|
||||
assert_eq!(
|
||||
digest.to_vec(),
|
||||
|
||||
Reference in New Issue
Block a user