Use full path in macros to to eliminate uses
This commit is contained in:
parent
e5b5cbfadb
commit
95303a1d28
|
@ -25,7 +25,7 @@ use util::Error::{SpvBadTarget, SpvBadProofOfWork};
|
|||
use util::hash::Sha256dHash;
|
||||
use util::uint::Uint256;
|
||||
use network::encodable::VarInt;
|
||||
use network::serialize::{self, BitcoinHash};
|
||||
use network::serialize::BitcoinHash;
|
||||
use network::constants::Network;
|
||||
use blockdata::transaction::Transaction;
|
||||
use blockdata::constants::max_target;
|
||||
|
|
|
@ -16,7 +16,7 @@ macro_rules! impl_consensus_encoding {
|
|||
($thing:ident, $($field:ident),+) => (
|
||||
impl<S: ::network::serialize::SimpleEncoder> ::network::encodable::ConsensusEncodable<S> for $thing {
|
||||
#[inline]
|
||||
fn consensus_encode(&self, s: &mut S) -> Result<(), serialize::Error> {
|
||||
fn consensus_encode(&self, s: &mut S) -> Result<(), ::network::serialize::Error> {
|
||||
$( self.$field.consensus_encode(s)?; )+
|
||||
Ok(())
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ macro_rules! impl_consensus_encoding {
|
|||
|
||||
impl<D: ::network::serialize::SimpleDecoder> ::network::encodable::ConsensusDecodable<D> for $thing {
|
||||
#[inline]
|
||||
fn consensus_decode(d: &mut D) -> Result<$thing, serialize::Error> {
|
||||
fn consensus_decode(d: &mut D) -> Result<$thing, ::network::serialize::Error> {
|
||||
use network::encodable::ConsensusDecodable;
|
||||
Ok($thing {
|
||||
$( $field: ConsensusDecodable::consensus_decode(d)?, )+
|
||||
|
@ -38,7 +38,7 @@ macro_rules! impl_newtype_consensus_encoding {
|
|||
($thing:ident) => (
|
||||
impl<S: ::network::serialize::SimpleEncoder> ::network::encodable::ConsensusEncodable<S> for $thing {
|
||||
#[inline]
|
||||
fn consensus_encode(&self, s: &mut S) -> Result<(), serialize::Error> {
|
||||
fn consensus_encode(&self, s: &mut S) -> Result<(), ::network::serialize::Error> {
|
||||
let &$thing(ref data) = self;
|
||||
data.consensus_encode(s)
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ macro_rules! impl_newtype_consensus_encoding {
|
|||
|
||||
impl<D: ::network::serialize::SimpleDecoder> ::network::encodable::ConsensusDecodable<D> for $thing {
|
||||
#[inline]
|
||||
fn consensus_decode(d: &mut D) -> Result<$thing, serialize::Error> {
|
||||
fn consensus_decode(d: &mut D) -> Result<$thing, ::network::serialize::Error> {
|
||||
Ok($thing(ConsensusDecodable::consensus_decode(d)?))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
use network::constants;
|
||||
use network::address::Address;
|
||||
use network::serialize;
|
||||
use network::socket::Socket;
|
||||
use util;
|
||||
|
||||
|
|
Loading…
Reference in New Issue