From 5b29b6d06440317ba45de65bc946f356bceb3122 Mon Sep 17 00:00:00 2001 From: Arkadiy Paronyan Date: Mon, 16 Oct 2017 12:31:52 +0200 Subject: [PATCH] Squash remaining warnings (#6789) * Fixed comment warnings * Fixed remaining warnings --- dapps/src/tests/helpers/mod.rs | 2 +- ethcore/src/machine.rs | 2 +- ethkey/src/extended.rs | 12 ++++++------ hw/src/trezor.rs | 2 +- rpc/src/v1/tests/mocked/eth.rs | 4 ++-- .../admin_sessions/share_move_session.rs | 2 +- util/table/src/lib.rs | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dapps/src/tests/helpers/mod.rs b/dapps/src/tests/helpers/mod.rs index 4ee21c8f4..81ed5ed41 100644 --- a/dapps/src/tests/helpers/mod.rs +++ b/dapps/src/tests/helpers/mod.rs @@ -268,7 +268,7 @@ impl Server { }; let mut allowed_hosts: Option> = allowed_hosts.into(); - allowed_hosts.as_mut().map(|mut hosts| { + allowed_hosts.as_mut().map(|hosts| { hosts.push(format!("http://*.{}:*", DAPPS_DOMAIN).into()); hosts.push(format!("http://*.{}", DAPPS_DOMAIN).into()); }); diff --git a/ethcore/src/machine.rs b/ethcore/src/machine.rs index 2536384e6..667211c52 100644 --- a/ethcore/src/machine.rs +++ b/ethcore/src/machine.rs @@ -263,7 +263,7 @@ impl EthereumMachine { } else if block_number < ext.eip150_transition { Schedule::new_homestead() } else { - /// There's no max_code_size transition so we tie it to eip161abc + // There's no max_code_size transition so we tie it to eip161abc let max_code_size = if block_number >= ext.eip161abc_transition { self.params.max_code_size as usize } else { diff --git a/ethkey/src/extended.rs b/ethkey/src/extended.rs index 45ed0547f..c545cd3e4 100644 --- a/ethkey/src/extended.rs +++ b/ethkey/src/extended.rs @@ -477,8 +477,8 @@ mod tests { .expect("Seed should be valid H128") .to_vec(); - /// private key from bitcoin test vector - /// xprv9wTYmMFdV23N2TdNG573QoEsfRrWKQgWeibmLntzniatZvR9BmLnvSxqu53Kw1UmYPxLgboyZQaXwTCg8MSY3H2EU4pWcQDnRnrVA1xe8fs + // private key from bitcoin test vector + // xprv9wTYmMFdV23N2TdNG573QoEsfRrWKQgWeibmLntzniatZvR9BmLnvSxqu53Kw1UmYPxLgboyZQaXwTCg8MSY3H2EU4pWcQDnRnrVA1xe8fs let test_private = H256::from_str("e8f32e723decf4051aefac8e2c93c9c5b214313817cdb01a1494b917c8436b35") .expect("Private should be decoded ok"); @@ -489,8 +489,8 @@ mod tests { #[test] fn test_vector_1() { - /// xprv9uHRZZhk6KAJC1avXpDAp4MDc3sQKNxDiPvvkX8Br5ngLNv1TxvUxt4cV1rGL5hj6KCesnDYUhd7oWgT11eZG7XnxHrnYeSvkzY7d2bhkJ7 - /// H(0) + // xprv9uHRZZhk6KAJC1avXpDAp4MDc3sQKNxDiPvvkX8Br5ngLNv1TxvUxt4cV1rGL5hj6KCesnDYUhd7oWgT11eZG7XnxHrnYeSvkzY7d2bhkJ7 + // H(0) test_extended( |secret| secret.derive(2147483648.into()), H256::from_str("edb2e14f9ee77d26dd93b4ecede8d16ed408ce149b6cd80b0715a2d911a0afea") @@ -500,8 +500,8 @@ mod tests { #[test] fn test_vector_2() { - /// xprv9wTYmMFdV23N2TdNG573QoEsfRrWKQgWeibmLntzniatZvR9BmLnvSxqu53Kw1UmYPxLgboyZQaXwTCg8MSY3H2EU4pWcQDnRnrVA1xe8fs - /// H(0)/1 + // xprv9wTYmMFdV23N2TdNG573QoEsfRrWKQgWeibmLntzniatZvR9BmLnvSxqu53Kw1UmYPxLgboyZQaXwTCg8MSY3H2EU4pWcQDnRnrVA1xe8fs + // H(0)/1 test_extended( |secret| secret.derive(2147483648.into()).derive(1.into()), H256::from_str("3c6cb8d0f6a264c91ea8b5030fadaa8e538b020f0a387421a12de9319dc93368") diff --git a/hw/src/trezor.rs b/hw/src/trezor.rs index a89d26f66..239968120 100644 --- a/hw/src/trezor.rs +++ b/hw/src/trezor.rs @@ -201,7 +201,7 @@ impl Manager { where F: Fn() -> Result { let mut err = Error::KeyNotFound; - /// Try to open device a few times. + // Try to open device a few times. for _ in 0..10 { match f() { Ok(handle) => return Ok(handle), diff --git a/rpc/src/v1/tests/mocked/eth.rs b/rpc/src/v1/tests/mocked/eth.rs index 96329d18c..337ef9513 100644 --- a/rpc/src/v1/tests/mocked/eth.rs +++ b/rpc/src/v1/tests/mocked/eth.rs @@ -471,7 +471,7 @@ fn rpc_eth_transaction_count() { #[test] fn rpc_eth_transaction_count_next_nonce() { - let tester = EthTester::new_with_options(EthClientOptions::with(|mut options| { + let tester = EthTester::new_with_options(EthClientOptions::with(|options| { options.pending_nonce_from_queue = true; })); tester.miner.increment_last_nonce(1.into()); @@ -1104,7 +1104,7 @@ fn rpc_get_work_returns_correct_work_package() { #[test] fn rpc_get_work_should_not_return_block_number() { - let eth_tester = EthTester::new_with_options(EthClientOptions::with(|mut options| { + let eth_tester = EthTester::new_with_options(EthClientOptions::with(|options| { options.send_block_number_in_get_work = false; })); eth_tester.miner.set_author(Address::from_str("d46e8dd67c5d32be8058bb8eb970870f07244567").unwrap()); diff --git a/secret_store/src/key_server_cluster/admin_sessions/share_move_session.rs b/secret_store/src/key_server_cluster/admin_sessions/share_move_session.rs index a19a9eee0..d193e9efd 100644 --- a/secret_store/src/key_server_cluster/admin_sessions/share_move_session.rs +++ b/secret_store/src/key_server_cluster/admin_sessions/share_move_session.rs @@ -419,7 +419,7 @@ impl SessionImpl where T: SessionTransport { // find share source { - let mut move_confirmations_to_receive = data.move_confirmations_to_receive.as_mut() + let move_confirmations_to_receive = data.move_confirmations_to_receive.as_mut() .expect("move_confirmations_to_receive are filled during consensus establishing; move confirmations are processed after this; qed"); if !move_confirmations_to_receive.remove(sender) { return Err(Error::InvalidMessage); diff --git a/util/table/src/lib.rs b/util/table/src/lib.rs index bef453426..78b2c646a 100644 --- a/util/table/src/lib.rs +++ b/util/table/src/lib.rs @@ -247,7 +247,7 @@ mod test { // when { - let mut row = table.row_mut(&1).unwrap(); + let row = table.row_mut(&1).unwrap(); row.remove(&1); row.remove(&2); }