Skip to content

Commit 5e7e25d

Browse files
brooksprumoilya-bobyr
authored andcommitted
Upgrade to Rust 1.64.0 (#28034)
1 parent 7d830bb commit 5e7e25d

File tree

12 files changed

+18
-18
lines changed

12 files changed

+18
-18
lines changed

banks-client/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ mod tests {
525525
}
526526

527527
#[test]
528+
#[allow(clippy::result_large_err)]
528529
fn test_banks_server_transfer_via_server() -> Result<(), BanksClientError> {
529530
// This test shows the preferred way to interact with BanksServer.
530531
// It creates a runtime explicitly (no globals via tokio macros) and calls
@@ -563,6 +564,7 @@ mod tests {
563564
}
564565

565566
#[test]
567+
#[allow(clippy::result_large_err)]
566568
fn test_banks_server_transfer_via_client() -> Result<(), BanksClientError> {
567569
// The caller may not want to hold the connection open until the transaction
568570
// is processed (or blockhash expires). In this test, we verify the

ci/docker-rust-nightly/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM solanalabs/rust:1.63.0
1+
FROM solanalabs/rust:1.64.0
22
ARG date
33

44
RUN set -x \

ci/docker-rust/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Note: when the rust version is changed also modify
22
# ci/rust-version.sh to pick up the new image tag
3-
FROM rust:1.63.0
3+
FROM rust:1.64.0
44

55
# Add Google Protocol Buffers for Libra's metrics library.
66
ENV PROTOC_VERSION 3.8.0

ci/rust-version.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
if [[ -n $RUST_STABLE_VERSION ]]; then
1919
stable_version="$RUST_STABLE_VERSION"
2020
else
21-
stable_version=1.63.0
21+
stable_version=1.64.0
2222
fi
2323

2424
if [[ -n $RUST_NIGHTLY_VERSION ]]; then
2525
nightly_version="$RUST_NIGHTLY_VERSION"
2626
else
27-
nightly_version=2022-08-12
27+
nightly_version=2022-09-22
2828
fi
2929

3030

core/benches/shredder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ fn bench_shredder_decoding_raptorq(bencher: &mut Bencher) {
217217
let mut result = None;
218218
for packet in &packets {
219219
result = decoder.decode(packet.clone());
220-
if result != None {
220+
if result.is_some() {
221221
break;
222222
}
223223
}

core/src/cluster_slot_state_verifier.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ pub enum ResultingStateChange {
300300
impl SlotStateUpdate {
301301
fn into_state_changes(self, slot: Slot) -> Vec<ResultingStateChange> {
302302
let bank_frozen_hash = self.bank_hash();
303-
if bank_frozen_hash == None {
303+
if bank_frozen_hash.is_none() {
304304
// If the bank hasn't been frozen yet, then there's nothing to do
305305
// since replay of the slot hasn't finished yet.
306306
return vec![];

core/src/replay_stage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3287,7 +3287,7 @@ impl ReplayStage {
32873287
loop {
32883288
// These cases mean confirmation of propagation on any earlier
32893289
// leader blocks must have been reached
3290-
if current_leader_slot == None || current_leader_slot.unwrap() < root {
3290+
if current_leader_slot.is_none() || current_leader_slot.unwrap() < root {
32913291
break;
32923292
}
32933293

gossip/src/cluster_info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ pub fn make_accounts_hashes_message(
267267
pub(crate) type Ping = ping_pong::Ping<[u8; GOSSIP_PING_TOKEN_SIZE]>;
268268

269269
// TODO These messages should go through the gpu pipeline for spam filtering
270-
#[frozen_abi(digest = "32XMrR8yTPMsw7TASQDinrbcB4bdVGyLeTvQrk95hS4i")]
270+
#[frozen_abi(digest = "Hsj6a2bmzxno1RUcSM1gzHAg2zxgw15E3feb2SimieBA")]
271271
#[derive(Serialize, Deserialize, Debug, AbiEnumVisitor, AbiExample)]
272272
#[allow(clippy::large_enum_variant)]
273273
pub(crate) enum Protocol {

merkle-tree/src/merkle_tree.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl<'a> ProofEntry<'a> {
3333
left_sibling: Option<&'a Hash>,
3434
right_sibling: Option<&'a Hash>,
3535
) -> Self {
36-
assert!((None == left_sibling) ^ (None == right_sibling));
36+
assert!(left_sibling.is_none() ^ right_sibling.is_none());
3737
Self(target, left_sibling, right_sibling)
3838
}
3939
}
@@ -154,7 +154,7 @@ impl MerkleTree {
154154
let level = &self.nodes[level_start..(level_start + level_len)];
155155

156156
let target = &level[node_index];
157-
if lsib != None || rsib != None {
157+
if lsib.is_some() || rsib.is_some() {
158158
path.push(ProofEntry::new(target, lsib, rsib));
159159
}
160160
if node_index % 2 == 0 {

perf/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn is_rosetta_emulated() -> bool {
2727
{
2828
use std::str::FromStr;
2929
std::process::Command::new("sysctl")
30-
.args(&["-in", "sysctl.proc_translated"])
30+
.args(["-in", "sysctl.proc_translated"])
3131
.output()
3232
.map_err(|_| ())
3333
.and_then(|output| String::from_utf8(output.stdout).map_err(|_| ()))

0 commit comments

Comments
 (0)