Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
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"]
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![cfg_attr(not(feature="std"), no_std)]

extern crate bigint;
extern crate uint;

#[cfg(feature="std")]
extern crate core;
Expand All @@ -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};
Expand Down Expand Up @@ -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<u8> = s.from_hex()?;
if a.len() != $size {
return Err(FromHexError::InvalidHexLength);
}
Expand Down