Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Commit

Permalink
fix: style
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanxyg committed Oct 23, 2019
1 parent 44659ba commit 6005ad5
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 35 deletions.
8 changes: 3 additions & 5 deletions protocol/src/fixed_codec/epoch.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
use bytes::Bytes;

use crate::fixed_codec::{FixedCodecError, ProtocolFixedCodec};
use crate::types::{
epoch::{Epoch, EpochHeader, EpochId, Pill, Proof, Validator},
primitive::Hash,
Bloom,
};
use crate::types::epoch::{Epoch, EpochHeader, EpochId, Pill, Proof, Validator};
use crate::types::primitive::Hash;
use crate::types::Bloom;
use crate::{impl_default_fixed_codec_for, ProtocolResult};

// Impl ProtocolFixedCodec trait for types
Expand Down
9 changes: 3 additions & 6 deletions protocol/src/fixed_codec/genesis.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
use bytes::Bytes;

use crate::{
fixed_codec::{FixedCodecError, ProtocolFixedCodec},
impl_default_fixed_codec_for,
types::genesis::{Genesis, GenesisStateAlloc, GenesisStateAsset, GenesisSystemToken},
ProtocolResult,
};
use crate::fixed_codec::{FixedCodecError, ProtocolFixedCodec};
use crate::types::genesis::{Genesis, GenesisStateAlloc, GenesisStateAsset, GenesisSystemToken};
use crate::{impl_default_fixed_codec_for, ProtocolResult};

impl_default_fixed_codec_for!(genesis, [
Genesis,
Expand Down
13 changes: 5 additions & 8 deletions protocol/src/fixed_codec/primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@ use std::collections::BTreeMap;

use bytes::Bytes;

use crate::{
fixed_codec::{FixedCodecError, ProtocolFixedCodec},
impl_default_fixed_codec_for,
types::{
Account, Address, ApprovedInfo, Asset, AssetID, AssetInfo, Balance, ContractAccount,
ContractAddress, Fee, Hash, UserAccount, UserAddress,
},
ProtocolResult,
use crate::fixed_codec::{FixedCodecError, ProtocolFixedCodec};
use crate::types::{
Account, Address, ApprovedInfo, Asset, AssetID, AssetInfo, Balance, ContractAccount,
ContractAddress, Fee, Hash, UserAccount, UserAddress,
};
use crate::{impl_default_fixed_codec_for, ProtocolResult};

// Impl ProtocolFixedCodec trait for types
impl_default_fixed_codec_for!(primitive, [
Expand Down
6 changes: 2 additions & 4 deletions protocol/src/fixed_codec/receipt.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use bytes::Bytes;

use crate::fixed_codec::{FixedCodecError, ProtocolFixedCodec};
use crate::types::{
primitive::{Balance, ContractType, Fee},
receipt::{Receipt, ReceiptResult},
};
use crate::types::primitive::{Balance, ContractType, Fee};
use crate::types::receipt::{Receipt, ReceiptResult};
use crate::{impl_default_fixed_codec_for, ProtocolResult};

// Impl ProtocolFixedCodec trait for types
Expand Down
18 changes: 9 additions & 9 deletions protocol/src/fixed_codec/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ use bytes::Bytes;
use num_traits::FromPrimitive;
use rand::random;

use crate::types::{
epoch::{Epoch, EpochHeader, EpochId, Pill, Proof, Validator},
genesis::{Genesis, GenesisStateAlloc, GenesisStateAsset, GenesisSystemToken},
primitive::{
Account, Asset, AssetID, AssetInfo, Balance, ContractAccount, ContractAddress,
ContractType, Fee, Hash, MerkleRoot, UserAccount, UserAddress,
},
receipt::{Receipt, ReceiptResult},
transaction::{CarryingAsset, RawTransaction, SignedTransaction, TransactionAction},
use crate::types::epoch::{Epoch, EpochHeader, EpochId, Pill, Proof, Validator};
use crate::types::genesis::{Genesis, GenesisStateAlloc, GenesisStateAsset, GenesisSystemToken};
use crate::types::primitive::{
Account, Asset, AssetID, AssetInfo, Balance, ContractAccount, ContractAddress, ContractType,
Fee, Hash, MerkleRoot, UserAccount, UserAddress,
};
use crate::types::receipt::{Receipt, ReceiptResult};
use crate::types::transaction::{
CarryingAsset, RawTransaction, SignedTransaction, TransactionAction,
};

pub enum ReceiptType {
Expand Down
6 changes: 3 additions & 3 deletions protocol/src/fixed_codec/transaction.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use bytes::Bytes;

use crate::fixed_codec::{FixedCodecError, ProtocolFixedCodec};
use crate::types::{
primitive::{Balance, ContractAddress, ContractType, Fee, Hash, UserAddress},
transaction::{CarryingAsset, RawTransaction, SignedTransaction, TransactionAction},
use crate::types::primitive::{Balance, ContractAddress, ContractType, Fee, Hash, UserAddress};
use crate::types::transaction::{
CarryingAsset, RawTransaction, SignedTransaction, TransactionAction,
};
use crate::{impl_default_fixed_codec_for, ProtocolResult};

Expand Down

0 comments on commit 6005ad5

Please sign in to comment.