Fixing clippy warnings

This commit is contained in:
Tomasz Drwięga 2016-05-04 15:22:22 +02:00
parent 58fd0175bf
commit 15a8860e8a
5 changed files with 10 additions and 9 deletions

1
Cargo.lock generated
View File

@ -348,6 +348,7 @@ dependencies = [
"libc 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"mio 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"nix 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rocksdb 0.4.3 (git+https://github.com/arkpar/rust-rocksdb.git)",
"rust-crypto 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",

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

@ -208,7 +208,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) {