diff --git a/Cargo.toml b/Cargo.toml index 3af19c6..34b6676 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,17 +1,17 @@ [package] name = "parity-hash" -version = "1.2.1" +version = "1.2.2" description = "A collection of fixed-size byte array representations" authors = ["Alexey Frolov "] license = "MIT" [dependencies] -bigint = "4" -rustc-hex = "1.0" +uint = "0.3" +rustc-hex = { version = "2.0", default-features = false} serde = { version = "1.0", optional = true } serde_derive = { version = "1.0", optional = true } [features] default = ["std"] -std = ["bigint/std"] +std = ["uint/std"] serialize = ["serde", "serde_derive"] diff --git a/src/lib.rs b/src/lib.rs index f0fd780..3385cab 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ #![cfg_attr(not(feature="std"), no_std)] -extern crate bigint; +extern crate uint; #[cfg(feature="std")] extern crate core; @@ -21,7 +21,7 @@ use core::{ops, cmp}; use core::cmp::{min, Ordering}; use core::ops::{Deref, DerefMut, BitXor, BitAnd, BitOr, IndexMut, Index}; use core::hash::{Hash, Hasher}; -use bigint::U256; +use uint::U256; #[cfg(feature="std")] use rustc_hex::{FromHex, FromHexError}; @@ -172,7 +172,7 @@ macro_rules! impl_hash { type Err = FromHexError; fn from_str(s: &str) -> Result<$from, FromHexError> { - let a = s.from_hex()?; + let a : Vec = s.from_hex()?; if a.len() != $size { return Err(FromHexError::InvalidHexLength); }