From 91b87cd91eaa9b5c26518cce48ba4cf55c13bd9e Mon Sep 17 00:00:00 2001 From: debris Date: Tue, 14 Nov 2017 15:38:09 +0100 Subject: [PATCH] unify hash macro by renaming it to `construct_hash` --- Cargo.toml | 3 +++ examples/modular.rs | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ee7b70f..8751dc2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,9 @@ byteorder = { version = "1", default-features = false } heapsize = { version = "0.4", optional = true } rustc-hex = { version = "1.0", optional = true } +[dev-dependencies] +crunchy = "0.1.5" + [features] std = ["rustc-hex"] heapsizeof = ["heapsize"] diff --git a/examples/modular.rs b/examples/modular.rs index 06a808a..1db193f 100644 --- a/examples/modular.rs +++ b/examples/modular.rs @@ -6,9 +6,16 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[cfg(feature="std")] +extern crate core; + +#[macro_use] +extern crate crunchy; + +#[macro_use] extern crate uint; -use uint::U256; +construct_uint!(U256, 32); fn main() { // Example modular arithmetic using bigint U256 primitives