Skip to content

Commit

Permalink
Update to Rust 1.56.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Dec 1, 2021
1 parent 0937e40 commit e922c2d
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion ci/docker-rust-nightly/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM solanalabs/rust:1.56.0
FROM solanalabs/rust:1.56.1
ARG date

RUN set -x \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker-rust/Dockerfile
Original file line number Diff line number Diff line change
@@ -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.56.0
FROM rust:1.56.1

# Add Google Protocol Buffers for Libra's metrics library.
ENV PROTOC_VERSION 3.8.0
Expand Down
4 changes: 2 additions & 2 deletions ci/rust-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
if [[ -n $RUST_STABLE_VERSION ]]; then
stable_version="$RUST_STABLE_VERSION"
else
stable_version=1.56.0
stable_version=1.56.1
fi

if [[ -n $RUST_NIGHTLY_VERSION ]]; then
nightly_version="$RUST_NIGHTLY_VERSION"
else
nightly_version=2021-10-22
nightly_version=2021-11-30
fi


Expand Down
2 changes: 1 addition & 1 deletion cli/src/cluster_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,7 @@ pub fn process_ping(
if print_timestamp {
format!("[{}.{:06}] ", micros / 1_000_000, micros % 1_000_000)
} else {
format!("")
String::new()
}
};

Expand Down
1 change: 0 additions & 1 deletion runtime/src/append_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,6 @@ pub mod tests {
// assert_eq! thinks *executable_bool is equal to false but the if condition thinks it's not, contradictorily.
assert!(!*executable_bool);
const FALSE: bool = false; // keep clippy happy
#[allow(clippy::if_then_panic)]
if *executable_bool == FALSE {
panic!("This didn't occur if this test passed.");
}
Expand Down
20 changes: 10 additions & 10 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8151,7 +8151,7 @@ pub(crate) mod tests {
#[should_panic(expected = "range start is greater than range end in BTreeMap")]
fn test_rent_eager_bad_range() {
let test_map = map_to_test_bad_range();
test_map.range(
let _ = test_map.range(
Pubkey::new_from_array([
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Expand Down Expand Up @@ -8183,7 +8183,7 @@ pub(crate) mod tests {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff
])
);
test_map.range(range);
let _ = test_map.range(range);

let range = Bank::pubkey_range_from_partition((1, 1, 3));
assert_eq!(
Expand All @@ -8199,7 +8199,7 @@ pub(crate) mod tests {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
])
);
test_map.range(range);
let _ = test_map.range(range);

let range = Bank::pubkey_range_from_partition((2, 2, 3));
assert_eq!(
Expand All @@ -8215,7 +8215,7 @@ pub(crate) mod tests {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff
])
);
test_map.range(range);
let _ = test_map.range(range);
}

#[test]
Expand All @@ -8236,7 +8236,7 @@ pub(crate) mod tests {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff
])
);
test_map.range(range);
let _ = test_map.range(range);

let range = Bank::pubkey_range_from_partition((0, 1, 2));
assert_eq!(
Expand All @@ -8252,7 +8252,7 @@ pub(crate) mod tests {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff
])
);
test_map.range(range);
let _ = test_map.range(range);
}

#[test]
Expand All @@ -8274,7 +8274,7 @@ pub(crate) mod tests {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff
])
);
test_map.range(range);
let _ = test_map.range(range);

let range = Bank::pubkey_range_from_partition((0, 1, 3));
assert_eq!(
Expand All @@ -8290,7 +8290,7 @@ pub(crate) mod tests {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff
])
);
test_map.range(range);
let _ = test_map.range(range);

let range = Bank::pubkey_range_from_partition((1, 2, 3));
assert_eq!(
Expand All @@ -8306,7 +8306,7 @@ pub(crate) mod tests {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff
])
);
test_map.range(range);
let _ = test_map.range(range);
}

#[test]
Expand All @@ -8328,7 +8328,7 @@ pub(crate) mod tests {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff
])
);
test_map.range(range);
let _ = test_map.range(range);
}

impl Bank {
Expand Down
2 changes: 1 addition & 1 deletion scripts/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if ! command -v grcov; then
exit 1
fi

if [[ ! "$(grcov --version)" =~ 0.[678].[012] ]]; then
if [[ ! "$(grcov --version)" =~ 0.[678].[0124] ]]; then
echo Error: Required grcov version not installed

echo "Installed version: $(grcov --version)"
Expand Down
10 changes: 5 additions & 5 deletions sdk/program/src/borsh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ mod tests {
#[derive(PartialEq, Clone, Debug, BorshSerialize, BorshDeserialize, BorshSchema)]
enum TestEnum {
NoValue,
Value(u32),
StructValue {
Number(u32),
Struct {
#[allow(dead_code)]
number: u64,
#[allow(dead_code)]
Expand Down Expand Up @@ -204,7 +204,7 @@ mod tests {

#[test]
fn instance_packed_len_matches_packed_len() {
let enumeration = TestEnum::StructValue {
let enumeration = TestEnum::Struct {
number: u64::MAX,
array: [255; 8],
};
Expand Down Expand Up @@ -278,9 +278,9 @@ mod tests {
let string1 = "the first string, it's actually really really long".to_string();
let enum1 = TestEnum::NoValue;
let string2 = "second string, shorter".to_string();
let enum2 = TestEnum::Value(u32::MAX);
let enum2 = TestEnum::Number(u32::MAX);
let string3 = "third".to_string();
let enum3 = TestEnum::StructValue {
let enum3 = TestEnum::Struct {
number: 0,
array: [0; 8],
};
Expand Down

0 comments on commit e922c2d

Please sign in to comment.