mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 05:27:56 +00:00
Fix several warnings and remove some forbid(warnings) (#2874)
This commit is contained in:
committed by
Gavin Wood
parent
ecf25c9289
commit
e09045bde2
@@ -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]
|
||||
|
||||
@@ -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<B: Block>(header: &B::Header) -> Result<BabePreDigest, String
|
||||
/// This digest item will always return `Some` when used with `as_babe_pre_digest`.
|
||||
//
|
||||
// FIXME #1018 needs misbehavior types
|
||||
#[forbid(warnings)]
|
||||
fn check_header<B: Block + Sized, C: AuxStore>(
|
||||
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]
|
||||
|
||||
@@ -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::{
|
||||
|
||||
@@ -534,7 +534,7 @@ fn run_to_completion_with<F>(
|
||||
.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]
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -1272,7 +1272,7 @@ fn on_free_balance_zero_stash_removes_validator() {
|
||||
assert!(<Payee<Test>>::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!(<Payee<Test>>::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!(<Payee<Test>>::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!(<Payee<Test>>::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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user