Merge pull request #1044 from ethcore/clippy-warnings

Fixing clippy warnings
This commit is contained in:
Nikolay Volf 2016-05-04 18:10:03 +03:00
commit ad00bd7bc8
4 changed files with 9 additions and 9 deletions

View File

@ -24,7 +24,7 @@ use engine::*;
use evm::{Schedule, Factory};
use ethjson;
/// BasicAuthority params.
/// `BasicAuthority` params.
#[derive(Debug, PartialEq)]
pub struct BasicAuthorityParams {
/// Gas limit divisor.
@ -45,7 +45,7 @@ impl From<ethjson::spec::BasicAuthorityParams> for BasicAuthorityParams {
}
}
/// Engine using BasicAuthority proof-of-work consensus algorithm, suitable for Ethereum
/// Engine using `BasicAuthority` proof-of-work consensus algorithm, suitable for Ethereum
/// mainnet chains in the Olympic, Frontier and Homestead eras.
pub struct BasicAuthority {
params: CommonParams,
@ -192,7 +192,7 @@ impl Header {
}
}
/// Create a new test chain spec with BasicAuthority consensus engine.
/// Create a new test chain spec with `BasicAuthority` consensus engine.
pub fn new_test_authority() -> Spec { Spec::load(include_bytes!("../res/test_authority.json")) }
#[cfg(test)]

View File

@ -42,7 +42,7 @@ use env_info::EnvInfo;
use executive::{Executive, Executed, TransactOptions, contract_address};
use receipt::LocalizedReceipt;
pub use blockchain::CacheSize as BlockChainCacheSize;
use trace::{TraceDB, ImportRequest as TraceImportRequest, LocalizedTrace, Database as TraceDatabase, Filter as TracedbFilter};
use trace::{TraceDB, ImportRequest as TraceImportRequest, LocalizedTrace, Database as TraceDatabase};
use trace;
/// General block status

View File

@ -166,9 +166,9 @@ impl Miner {
trace!(target: "miner", "prepare_sealing: block has transaction - attempting internal seal.");
// block with transactions - see if we can seal immediately.
let a = self.accounts.read().unwrap();
let s = chain.generate_seal(block.block(), match a.deref() {
&Some(ref x) => Some(x.deref() as &AccountProvider),
&None => None,
let s = chain.generate_seal(block.block(), match *a.deref() {
Some(ref x) => Some(x.deref() as &AccountProvider),
None => None,
});
if let Some(seal) = s {
trace!(target: "miner", "prepare_sealing: managed internal seal. importing...");
@ -183,7 +183,7 @@ impl Miner {
}
return;
} else {
trace!(target: "miner", "prepare_sealing: unable to generate seal internally");
trace!(target: "miner", "prepare_sealing: unable to generate seal internally");
}
}
if sealing_work.peek_last_ref().map_or(true, |pb| pb.block().fields().header.hash() != block.block().fields().header.hash()) {

View File

@ -214,7 +214,7 @@ fn execute_client(conf: Configuration) {
}
fn flush_stdout() {
::std::io::stdout().flush().ok().expect("stdout is flushable; qed");
::std::io::stdout().flush().expect("stdout is flushable; qed");
}
fn execute_account_cli(conf: Configuration) {