Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #2414 from ethcore/compilation-beta
Browse files Browse the repository at this point in the history
fix broken beta compilation (backport to beta)
  • Loading branch information
rphmeier authored Oct 2, 2016
2 parents 7f7fe33 + abc6970 commit 2e4672e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
9 changes: 6 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ethcore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ num_cpus = "0.2"
crossbeam = "0.2.9"
lazy_static = "0.2"
bloomchain = "0.1"
rayon = "0.3.1"
rayon = "0.4"
semver = "0.2"
bit-set = "0.4"
time = "0.1"
Expand Down
3 changes: 2 additions & 1 deletion ethkey/src/primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ macro_rules! impl_primitive {
($name: ident, $size: expr, $err: expr) => {

#[repr(C)]
#[derive(Eq)]
pub struct $name([u8; $size]);

impl fmt::Debug for $name {
Expand Down Expand Up @@ -62,6 +61,8 @@ macro_rules! impl_primitive {
}
}

impl Eq for $name { }

impl PartialOrd for $name {
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
let self_ref: &[u8] = &self.0;
Expand Down
4 changes: 3 additions & 1 deletion ethkey/src/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use rustc_serialize::hex::{ToHex, FromHex};
use {Secret, Public, SECP256K1, Error, Message, public_to_address, Address};

#[repr(C)]
#[derive(Eq)]
pub struct Signature([u8; 65]);

impl Signature {
Expand Down Expand Up @@ -51,6 +50,9 @@ impl ::std::cmp::PartialEq for Signature {
}
}

// manual implementation required in Rust 1.13+, see `std::cmp::AssertParamIsEq`.
impl Eq for Signature { }

// also manual for the same reason, but the pretty printing might be useful.
impl fmt::Debug for Signature {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
Expand Down
3 changes: 2 additions & 1 deletion rpc/src/v1/types/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ use util::{H64 as Eth64, H256 as EthH256, H520 as EthH520, H2048 as Eth2048, Add
macro_rules! impl_hash {
($name: ident, $other: ident, $size: expr) => {
/// Hash serialization
#[derive(Eq)]
pub struct $name([u8; $size]);

impl Eq for $name { }

impl Default for $name {
fn default() -> Self {
$name([0; $size])
Expand Down
4 changes: 3 additions & 1 deletion rpc/src/v1/types/uint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ use util::{U256 as EthU256, Uint};
macro_rules! impl_uint {
($name: ident, $other: ident, $size: expr) => {
/// Uint serialization.
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash)]
#[derive(Debug, Default, Clone, Copy, PartialEq, Hash)]
pub struct $name($other);

impl Eq for $name { }

impl<T> From<T> for $name where $other: From<T> {
fn from(o: T) -> Self {
$name($other::from(o))
Expand Down

0 comments on commit 2e4672e

Please sign in to comment.