upgrade rust to 1.37 (#5611)

This commit is contained in:
Rob Walker
2019-08-23 08:55:51 -07:00
committed by GitHub
parent aeaa0feb61
commit 52f6da5cee
10 changed files with 14 additions and 16 deletions

View File

@ -198,6 +198,7 @@ impl BankingStage {
if processed < verified_txs_len {
let next_leader = poh_recorder.lock().unwrap().next_slot_leader();
// Walk thru rest of the transactions and filter out the invalid (e.g. too old) ones
#[allow(clippy::while_let_on_iterator)]
while let Some((msgs, unprocessed_indexes)) = buffered_packets_iter.next() {
let unprocessed_indexes = Self::filter_unprocessed_packets(
&bank,
@ -849,6 +850,7 @@ impl BankingStage {
if processed < verified_txs_len {
let next_leader = poh.lock().unwrap().next_slot_leader();
// Walk thru rest of the transactions and filter out the invalid (e.g. too old) ones
#[allow(clippy::while_let_on_iterator)]
while let Some((msgs, vers)) = mms_iter.next() {
let packet_indexes = Self::generate_packet_indexes(vers);
let unprocessed_indexes = Self::filter_unprocessed_packets(

View File

@ -46,7 +46,7 @@ use std::sync::{Arc, RwLock};
use std::thread::{sleep, spawn, JoinHandle};
use std::time::Duration;
static ENCRYPTED_FILENAME: &'static str = "ledger.enc";
static ENCRYPTED_FILENAME: &str = "ledger.enc";
#[derive(Serialize, Deserialize)]
pub enum ReplicatorRequest {

View File

@ -11,6 +11,7 @@ use solana_sdk::signature::Signature;
use solana_sdk::transaction;
use std::sync::{atomic, Arc};
#[allow(clippy::needless_return)] // TODO remove me when rpc is updated?
#[rpc(server)]
pub trait RpcSolPubSub {
type Metadata;

View File

@ -72,11 +72,11 @@ impl Default for ValidatorConfig {
#[derive(Default)]
pub struct ValidatorExit {
exits: Vec<Box<FnOnce() + Send + Sync>>,
exits: Vec<Box<dyn FnOnce() + Send + Sync>>,
}
impl ValidatorExit {
pub fn register_exit(&mut self, exit: Box<FnOnce() -> () + Send + Sync>) {
pub fn register_exit(&mut self, exit: Box<dyn FnOnce() -> () + Send + Sync>) {
self.exits.push(exit);
}