diff --git a/substrate/core/consensus/aura/src/lib.rs b/substrate/core/consensus/aura/src/lib.rs index dc8a5ca2e4..896b2d4b00 100644 --- a/substrate/core/consensus/aura/src/lib.rs +++ b/substrate/core/consensus/aura/src/lib.rs @@ -889,7 +889,7 @@ mod tests { .map(|_| ()) .map_err(|_| ()); - runtime.block_on(wait_for.select(drive_to_completion).map_err(|_| ())).unwrap(); + let _ = runtime.block_on(wait_for.select(drive_to_completion).map_err(|_| ())).unwrap(); } #[test] diff --git a/substrate/core/consensus/babe/src/lib.rs b/substrate/core/consensus/babe/src/lib.rs index 8a81612183..3e1f38077f 100644 --- a/substrate/core/consensus/babe/src/lib.rs +++ b/substrate/core/consensus/babe/src/lib.rs @@ -24,7 +24,6 @@ //! happen at any point. This crate is also missing features, such as banning //! of malicious validators, that are essential for a production network. #![forbid(unsafe_code, missing_docs)] -#![deny(warnings)] extern crate core; mod digest; use digest::CompatibleDigestItem; @@ -434,7 +433,6 @@ fn find_pre_digest(header: &B::Header) -> Result( client: &C, slot_now: u64, @@ -950,7 +948,7 @@ mod tests { .map(drop) .map_err(drop); - runtime.block_on(wait_for.select(drive_to_completion).map_err(drop)).unwrap(); + let _ = runtime.block_on(wait_for.select(drive_to_completion).map_err(drop)).unwrap(); } #[test] diff --git a/substrate/core/finality-grandpa/src/lib.rs b/substrate/core/finality-grandpa/src/lib.rs index 02cdd2cfd1..e7410ca44a 100644 --- a/substrate/core/finality-grandpa/src/lib.rs +++ b/substrate/core/finality-grandpa/src/lib.rs @@ -51,15 +51,11 @@ //! number (this is num(signal) + N). When finalizing a block, we either apply //! or prune any signaled changes based on whether the signaling block is //! included in the newly-finalized chain. -#![forbid(warnings)] use futures::prelude::*; use log::{debug, info, warn}; use futures::sync::mpsc; -use client::{ - BlockchainEvents, CallExecutor, Client, backend::Backend, - error::Error as ClientError, -}; +use client::{BlockchainEvents, CallExecutor, Client, backend::Backend, error::Error as ClientError}; use client::blockchain::HeaderBackend; use parity_codec::Encode; use runtime_primitives::traits::{ diff --git a/substrate/core/finality-grandpa/src/tests.rs b/substrate/core/finality-grandpa/src/tests.rs index 95ed722d3f..8afa495334 100644 --- a/substrate/core/finality-grandpa/src/tests.rs +++ b/substrate/core/finality-grandpa/src/tests.rs @@ -534,7 +534,7 @@ fn run_to_completion_with( .map(|_| ()) .map_err(|_| ()); - runtime.block_on(wait_for.select(drive_to_completion).map_err(|_| ())).unwrap(); + let _ = runtime.block_on(wait_for.select(drive_to_completion).map_err(|_| ())).unwrap(); let highest_finalized = *highest_finalized.read(); highest_finalized @@ -628,7 +628,7 @@ fn finalize_3_voters_1_full_observer() { .map(|_| ()) .map_err(|_| ()); - runtime.block_on(wait_for.select(drive_to_completion).map_err(|_| ())).unwrap(); + let _ = runtime.block_on(wait_for.select(drive_to_completion).map_err(|_| ())).unwrap(); } #[test] @@ -802,7 +802,7 @@ fn transition_3_voters_twice_1_full_observer() { .map(|_| ()) .map_err(|_| ()); - runtime.block_on(wait_for.select(drive_to_completion).map_err(|_| ())).unwrap(); + let _ = runtime.block_on(wait_for.select(drive_to_completion).map_err(|_| ())).unwrap(); } #[test] diff --git a/substrate/core/network/src/service/tests.rs b/substrate/core/network/src/service/tests.rs index 1bcd4e90f9..f18f471e7a 100644 --- a/substrate/core/network/src/service/tests.rs +++ b/substrate/core/network/src/service/tests.rs @@ -88,7 +88,7 @@ fn basic_two_nodes_connectivity() { }); let combined = fut1.select(fut2).map_err(|(err, _)| err); - tokio::runtime::Runtime::new().unwrap().block_on_all(combined).unwrap(); + let _ = tokio::runtime::Runtime::new().unwrap().block_on_all(combined).unwrap(); } #[test] @@ -141,7 +141,7 @@ fn two_nodes_transfer_lots_of_packets() { }); let combined = fut1.select(fut2).map_err(|(err, _)| err); - tokio::runtime::Runtime::new().unwrap().block_on(combined).unwrap(); + let _ = tokio::runtime::Runtime::new().unwrap().block_on(combined).unwrap(); } #[test] @@ -255,7 +255,7 @@ fn basic_two_nodes_requests_in_parallel() { }); let combined = fut1.select(fut2).map_err(|(err, _)| err); - tokio::runtime::Runtime::new().unwrap().block_on_all(combined).unwrap(); + let _ = tokio::runtime::Runtime::new().unwrap().block_on_all(combined).unwrap(); } #[test] diff --git a/substrate/srml/staking/src/tests.rs b/substrate/srml/staking/src/tests.rs index 1124261989..180ce130ae 100644 --- a/substrate/srml/staking/src/tests.rs +++ b/substrate/srml/staking/src/tests.rs @@ -1272,7 +1272,7 @@ fn on_free_balance_zero_stash_removes_validator() { assert!(>::exists(&11)); // Reduce free_balance of controller to 0 - Balances::slash(&10, u64::max_value()); + let _ = Balances::slash(&10, u64::max_value()); // Check the balance of the stash account has not been touched assert_eq!(Balances::free_balance(&11), 256000); @@ -1287,7 +1287,7 @@ fn on_free_balance_zero_stash_removes_validator() { assert!(>::exists(&11)); // Reduce free_balance of stash to 0 - Balances::slash(&11, u64::max_value()); + let _ = Balances::slash(&11, u64::max_value()); // Check total balance of stash assert_eq!(Balances::total_balance(&11), 0); @@ -1328,7 +1328,7 @@ fn on_free_balance_zero_stash_removes_nominator() { assert!(>::exists(&11)); // Reduce free_balance of controller to 0 - Balances::slash(&10, u64::max_value()); + let _ = Balances::slash(&10, u64::max_value()); // Check total balance of account 10 assert_eq!(Balances::total_balance(&10), 0); @@ -1344,7 +1344,7 @@ fn on_free_balance_zero_stash_removes_nominator() { assert!(>::exists(&11)); // Reduce free_balance of stash to 0 - Balances::slash(&11, u64::max_value()); + let _ = Balances::slash(&11, u64::max_value()); // Check total balance of stash assert_eq!(Balances::total_balance(&11), 0);