upgrade rust to 1.37 (#5611)
This commit is contained in:
parent
aeaa0feb61
commit
52f6da5cee
|
@ -4,7 +4,7 @@ os:
|
|||
language: rust
|
||||
cache: cargo
|
||||
rust:
|
||||
- 1.36.0
|
||||
- 1.37.0
|
||||
|
||||
install:
|
||||
- source ci/rust-version.sh
|
||||
|
|
|
@ -78,7 +78,7 @@ $ source $HOME/.cargo/env
|
|||
$ rustup component add rustfmt
|
||||
```
|
||||
|
||||
If your rustc version is lower than 1.36.0, please update it:
|
||||
If your rustc version is lower than 1.37.0, please update it:
|
||||
|
||||
```bash
|
||||
$ rustup update
|
||||
|
@ -240,5 +240,3 @@ problem is solved by this code?" On the other hand, if a test does fail and you
|
|||
better way to solve the same problem, a Pull Request with your solution would most certainly be
|
||||
welcome! Likewise, if rewriting a test can better communicate what code it's protecting, please
|
||||
send us that patch!
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Note: when the rust version is changed also modify
|
||||
# ci/rust-version.sh to pick up the new image tag
|
||||
FROM rust:1.36.0
|
||||
FROM rust:1.37.0
|
||||
|
||||
# Add Google Protocol Buffers for Libra's metrics library.
|
||||
ENV PROTOC_VERSION 3.8.0
|
||||
|
@ -10,9 +10,7 @@ RUN set -x \
|
|||
&& apt update \
|
||||
&& apt-get install apt-transport-https \
|
||||
&& echo deb https://apt.buildkite.com/buildkite-agent stable main > /etc/apt/sources.list.d/buildkite-agent.list \
|
||||
&& echo deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-7 main > /etc/apt/sources.list.d/llvm.list \
|
||||
&& apt-key adv --no-tty --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 32A37959C2FA5C3C99EFBC32A79206696452D198 \
|
||||
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
|
||||
&& apt update \
|
||||
&& apt install -y \
|
||||
buildkite-agent \
|
||||
|
@ -20,7 +18,6 @@ RUN set -x \
|
|||
cmake \
|
||||
lcov \
|
||||
libclang-common-7-dev \
|
||||
llvm-7 \
|
||||
mscgen \
|
||||
rsync \
|
||||
sudo \
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# $ source ci/rust-version.sh
|
||||
#
|
||||
|
||||
stable_version=1.36.0
|
||||
nightly_version=2019-07-19
|
||||
stable_version=1.37.0
|
||||
nightly_version=2019-08-21
|
||||
|
||||
export rust_stable="$stable_version"
|
||||
export rust_stable_docker_image=solanalabs/rust:"$stable_version"
|
||||
|
|
|
@ -18,7 +18,7 @@ _ cargo +"$rust_stable" clippy --version
|
|||
_ cargo +"$rust_stable" clippy --all --exclude solana-sdk-c -- --deny=warnings
|
||||
_ cargo +"$rust_stable" clippy --manifest-path sdk-c/Cargo.toml -- --deny=warnings
|
||||
|
||||
_ cargo +"$rust_stable" audit --version
|
||||
# _ cargo +"$rust_stable" audit --version ### cargo-audit stopped supporting --version?? https://github.com/RustSec/cargo-audit/issues/100
|
||||
_ cargo +"$rust_stable" audit
|
||||
_ ci/nits.sh
|
||||
_ ci/order-crates-for-publishing.py
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -115,9 +115,9 @@ impl<T: Clone> AccountsIndex<T> {
|
|||
);
|
||||
fork_vec.retain(|(fork, _)| !Self::can_purge(max_root, *fork));
|
||||
|
||||
return None;
|
||||
None
|
||||
} else {
|
||||
return Some(account_info);
|
||||
Some(account_info)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue