removed unused code
This commit is contained in:
parent
40682073ab
commit
3a771fc122
|
@ -102,7 +102,6 @@ name = "chain"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bitcrypto 0.1.0",
|
||||
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"primitives 0.1.0",
|
||||
"rustc-serialize 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -502,7 +501,6 @@ dependencies = [
|
|||
name = "primitives"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -4,7 +4,6 @@ version = "0.1.0"
|
|||
authors = ["debris <marek.kotewicz@gmail.com>"]
|
||||
|
||||
[dependencies]
|
||||
byteorder = "0.5"
|
||||
rustc-serialize = "0.3"
|
||||
heapsize = "0.3"
|
||||
bitcrypto = { path = "../crypto" }
|
||||
|
|
|
@ -6,7 +6,6 @@ build = "build.rs"
|
|||
|
||||
[dependencies]
|
||||
heapsize = "0.3"
|
||||
byteorder = "0.5"
|
||||
rustc-serialize = "0.3"
|
||||
|
||||
[build-dependencies]
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#![cfg_attr(asm_available, feature(asm))]
|
||||
|
||||
extern crate byteorder;
|
||||
#[macro_use] extern crate heapsize;
|
||||
extern crate rustc_serialize;
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
use std::{str, fmt};
|
||||
use std::ops::{Shr, Shl, BitAnd, BitOr, BitXor, Not, Div, Rem, Mul, Add, Sub};
|
||||
use std::cmp::Ordering;
|
||||
use byteorder::{WriteBytesExt, LittleEndian, BigEndian};
|
||||
use hex::{FromHex, FromHexError};
|
||||
|
||||
/// Conversion from decimal string error
|
||||
|
@ -394,28 +393,6 @@ macro_rules! construct_uint {
|
|||
Ok(res)
|
||||
}
|
||||
|
||||
pub fn to_little_endian(&self) -> [u8; $n_words * 8] {
|
||||
let mut result = [0u8; $n_words * 8];
|
||||
{
|
||||
let mut result_ref: &mut [u8] = &mut result;
|
||||
for word in self.0.into_iter() {
|
||||
result_ref.write_u64::<LittleEndian>(*word).expect("sizeof($n_words * u8 * 8) == sizeof($n_words * u64); qed");
|
||||
}
|
||||
}
|
||||
result
|
||||
}
|
||||
|
||||
pub fn to_big_endian(&self) -> [u8; $n_words * 8] {
|
||||
let mut result = [0u8; $n_words * 8];
|
||||
{
|
||||
let mut result_ref: &mut [u8] = &mut result;
|
||||
for word in self.0.into_iter().rev() {
|
||||
result_ref.write_u64::<BigEndian>(*word).expect("sizeof($n_words * u8 * 8) == sizeof($n_words * u64); qed");
|
||||
}
|
||||
}
|
||||
result
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn low_u32(&self) -> u32 {
|
||||
let &$name(ref arr) = self;
|
||||
|
|
Loading…
Reference in New Issue