[dependencies]: unify rustc-hex (#11506)

* [dependency]: unify `rustc-hex`

* [private tx]: fix upgrade to `rustc hex 2.1.0`
This commit is contained in:
Niklas Adolfsson
2020-02-21 15:10:00 +01:00
committed by GitHub
parent bec867be03
commit 2018f5b0ab
52 changed files with 355 additions and 357 deletions

View File

@@ -53,7 +53,7 @@ pub struct PodAccount {
fn opt_bytes_to_hex<S>(opt_bytes: &Option<Bytes>, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer
{
let readable = opt_bytes.as_ref().map(|b| b.to_hex()).unwrap_or_default();
let readable: String = opt_bytes.as_ref().map(|b| b.to_hex()).unwrap_or_default();
serializer.collect_str(&format_args!("0x{}", readable))
}