-
Notifications
You must be signed in to change notification settings - Fork 51
Coding Style
JinGyeong Jeong edited this page Nov 21, 2019
·
11 revisions
Group imports into 3 groups:
- System
- Other Package
- Self Package
use std::collections::HashSet;
use codechain_types::{Address, H256};
use crypto::BLAKE_NULL_RLP;
use rlp::{UntrustedRlp, RlpStream, Encodable, Decodable, DecoderError};
use triehash::ordered_trie_root;
use super::Bytes;
use super::codechain_machine::CodeChainMachine;
use super::engine::ConsensusEngine;
use super::error::Error;
use super::header::{Header, Seal};
use super::machine::{LiveBlock, Transactions};
use super::transaction::{UnverifiedTransaction, SignedTransaction, TransactionError};
Reduce codechain_
prefix in package name to c
.
extern crate codechain_crypto as ccrypto;
extern crate codechain_io as cio;
extern crate codechain_types as ctypes;
For example, kademlia
module exports Config
and Extension
as KademliaConfig
and KademliaExtension
respectively to avoid confusion.
pub use self::config::Config as KademliaConfig;
pub use self::extension::Extension as KademliaExtension;