Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 50
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;usesuper::Bytes;usesuper::codechain_machine::CodeChainMachine;usesuper::engine::ConsensusEngine;usesuper::error::Error;usesuper::header::{Header,Seal};usesuper::machine::{LiveBlock,Transactions};usesuper::transaction::{UnverifiedTransaction,SignedTransaction,TransactionError};Reduce codechain_ prefix in package name to c.
externcrate codechain_crypto as ccrypto;externcrate codechain_io as cio;externcrate codechain_types as ctypes;For example, kademlia module exports Config and Extension as KademliaConfig and KademliaExtension respectively to avoid confusion.
pubuseself::config::ConfigasKademliaConfig;pubuseself::extension::ExtensionasKademliaExtension;