Update all crates versions

This commit is contained in:
Age Manning
2020-05-06 21:23:50 +10:00
parent 040beb78f4
commit c68e678cac
73 changed files with 550 additions and 1061 deletions

View File

@@ -1,17 +1,10 @@
use hex::ToHex;
use serde::de::{self, Visitor};
use std::fmt;
pub fn encode<T: AsRef<[u8]>>(data: T) -> String {
let mut hex = String::with_capacity(data.as_ref().len() * 2);
// Writing to a string never errors, so we can unwrap here.
data.write_hex(&mut hex).unwrap();
let hex = hex::encode(data);
let mut s = "0x".to_string();
s.push_str(hex.as_str());
s
}