diff --git a/dapps/js-glue/src/js.rs b/dapps/js-glue/src/js.rs index f89fcefc7..906b238ec 100644 --- a/dapps/js-glue/src/js.rs +++ b/dapps/js-glue/src/js.rs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -#![cfg_attr(feature="use-precompiled-js", allow(dead_code))] -#![cfg_attr(feature="use-precompiled-js", allow(unused_imports))] +#![cfg_attr(feature = "use-precompiled-js", allow(dead_code))] +#![cfg_attr(feature = "use-precompiled-js", allow(unused_imports))] use std::fmt; use std::process::Command; diff --git a/ethcore/evm/src/lib.rs b/ethcore/evm/src/lib.rs index 1b5610cef..6eca25f42 100644 --- a/ethcore/evm/src/lib.rs +++ b/ethcore/evm/src/lib.rs @@ -43,7 +43,7 @@ mod instructions; #[cfg(test)] mod tests; -#[cfg(all(feature="benches", test))] +#[cfg(all(feature = "benches", test))] mod benches; pub use vm::{ diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index 3691768dc..8c5abf3f5 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -20,20 +20,20 @@ mod ancient_import; mod client; mod config; mod error; -#[cfg(any(test, feature="test-helpers"))] +#[cfg(any(test, feature = "test-helpers"))] mod evm_test_client; mod io_message; -#[cfg(any(test, feature="test-helpers"))] +#[cfg(any(test, feature = "test-helpers"))] mod test_client; mod trace; pub use self::client::*; pub use self::config::{Mode, ClientConfig, DatabaseCompactionProfile, BlockChainConfig, VMType}; pub use self::error::Error; -#[cfg(any(test, feature="test-helpers"))] +#[cfg(any(test, feature = "test-helpers"))] pub use self::evm_test_client::{EvmTestClient, EvmTestError, TransactResult}; pub use self::io_message::ClientIoMessage; -#[cfg(any(test, feature="test-helpers"))] +#[cfg(any(test, feature = "test-helpers"))] pub use self::test_client::{TestBlockChainClient, EachBlockWith}; pub use self::chain_notify::{ChainNotify, ChainRoute, ChainRouteType, ChainMessageType}; pub use self::traits::{ diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index e89b0dfff..51e75d4b4 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -15,7 +15,7 @@ // along with Parity. If not, see . #![warn(missing_docs)] -#![cfg_attr(feature="benches", feature(test))] +#![cfg_attr(feature = "benches", feature(test))] //! Ethcore library //! @@ -173,9 +173,9 @@ mod tx_filter; #[cfg(test)] mod tests; #[cfg(test)] -#[cfg(feature="json-tests")] +#[cfg(feature = "json-tests")] mod json_tests; -#[cfg(any(test, feature="test-helpers"))] +#[cfg(any(test, feature = "test-helpers"))] pub mod test_helpers; #[cfg(test)] mod test_helpers_internal; diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index 784aa2a4e..6f785fe7f 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -515,7 +515,7 @@ macro_rules! load_bundled { }; } -#[cfg(any(test, feature="test-helpers"))] +#[cfg(any(test, feature = "test-helpers"))] macro_rules! load_machine_bundled { ($e:expr) => { Spec::load_machine( @@ -847,28 +847,28 @@ impl Spec { /// Create a new Spec which conforms to the Frontier-era Morden chain except that it's a /// NullEngine consensus. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_test() -> Spec { load_bundled!("null_morden") } /// Create the EthereumMachine corresponding to Spec::new_test. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_test_machine() -> EthereumMachine { load_machine_bundled!("null_morden") } /// Create a new Spec which conforms to the Frontier-era Morden chain except that it's a NullEngine consensus with applying reward on block close. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_test_with_reward() -> Spec { load_bundled!("null_morden_with_reward") } /// Create a new Spec which is a NullEngine consensus with a premine of address whose /// secret is keccak(''). - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_null() -> Spec { load_bundled!("null") } /// Create a new Spec which constructs a contract at address 5 with storage at 0 equal to 1. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_test_constructor() -> Spec { load_bundled!("constructor") } @@ -876,7 +876,7 @@ impl Spec { /// Create a new Spec with AuthorityRound consensus which does internal sealing (not /// requiring work). /// Accounts with secrets keccak("0") and keccak("1") are the validators. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_test_round() -> Self { load_bundled!("authority_round") } @@ -884,7 +884,7 @@ impl Spec { /// Create a new Spec with AuthorityRound consensus which does internal sealing (not /// requiring work) with empty step messages enabled. /// Accounts with secrets keccak("0") and keccak("1") are the validators. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_test_round_empty_steps() -> Self { load_bundled!("authority_round_empty_steps") } @@ -892,7 +892,7 @@ impl Spec { /// Create a new Spec with AuthorityRound consensus (with empty steps) using a block reward /// contract. The contract source code can be found at: /// https://github.com/parity-contracts/block-reward/blob/daf7d44383b6cdb11cb6b953b018648e2b027cfb/contracts/ExampleBlockReward.sol - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_test_round_block_reward_contract() -> Self { load_bundled!("authority_round_block_reward_contract") } @@ -900,7 +900,7 @@ impl Spec { /// Create a new Spec with Tendermint consensus which does internal sealing (not requiring /// work). /// Account keccak("0") and keccak("1") are a authorities. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_test_tendermint() -> Self { load_bundled!("tendermint") } @@ -913,7 +913,7 @@ impl Spec { /// "0xbfc708a000000000000000000000000082a978b3f5962a5b0957d9ee9eef472ee55b42f1" and added /// back in using /// "0x4d238c8e00000000000000000000000082a978b3f5962a5b0957d9ee9eef472ee55b42f1". - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_validator_safe_contract() -> Self { load_bundled!("validator_safe_contract") } @@ -921,7 +921,7 @@ impl Spec { /// The same as the `safeContract`, but allows reporting and uses AuthorityRound. /// Account is marked with `reportBenign` it can be checked as disliked with "0xd8f2e0bf". /// Validator can be removed with `reportMalicious`. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_validator_contract() -> Self { load_bundled!("validator_contract") } @@ -930,7 +930,7 @@ impl Spec { /// height. /// Account with secrets keccak("0") is the validator for block 1 and with keccak("1") /// onwards. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_validator_multi() -> Self { load_bundled!("validator_multi") } diff --git a/parity/lib.rs b/parity/lib.rs index 6ef332da6..c76872255 100644 --- a/parity/lib.rs +++ b/parity/lib.rs @@ -76,7 +76,7 @@ extern crate registrar; #[macro_use] extern crate log as rlog; -#[cfg(feature="secretstore")] +#[cfg(feature = "secretstore")] extern crate ethcore_secretstore; #[cfg(feature = "dapps")] diff --git a/parity/secretstore.rs b/parity/secretstore.rs index 3b4a4e468..0723a1d07 100644 --- a/parity/secretstore.rs +++ b/parity/secretstore.rs @@ -111,7 +111,7 @@ mod server { } } -#[cfg(feature="secretstore")] +#[cfg(feature = "secretstore")] mod server { use std::sync::Arc; use ethcore_secretstore;