diff --git a/Cargo.lock b/Cargo.lock index a5ae0ff1..693c51c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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)", diff --git a/chain/Cargo.toml b/chain/Cargo.toml index 485af24e..ca16d59f 100644 --- a/chain/Cargo.toml +++ b/chain/Cargo.toml @@ -4,7 +4,6 @@ version = "0.1.0" authors = ["debris "] [dependencies] -byteorder = "0.5" rustc-serialize = "0.3" heapsize = "0.3" bitcrypto = { path = "../crypto" } diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index c8f33616..faf0e094 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -6,7 +6,6 @@ build = "build.rs" [dependencies] heapsize = "0.3" -byteorder = "0.5" rustc-serialize = "0.3" [build-dependencies] diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index c119fe84..4ddb0c26 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -1,6 +1,5 @@ #![cfg_attr(asm_available, feature(asm))] -extern crate byteorder; #[macro_use] extern crate heapsize; extern crate rustc_serialize; diff --git a/primitives/src/uint.rs b/primitives/src/uint.rs index ea0730f5..9ae77bc8 100644 --- a/primitives/src/uint.rs +++ b/primitives/src/uint.rs @@ -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::(*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::(*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;