Skip to content

Commit

Permalink
toolchain: update to Rust 1.68.0
Browse files Browse the repository at this point in the history
Routine update to the latest version of Rust.
Release post: https://blog.rust-lang.org/2023/03/09/Rust-1.68.0.html

I don't see anything exciting for nearcore in the release.
Maybe `pin!` for custom futures could be useful.

The commit also includes clippy renaming `derive_hash_xor_eq`
to `derived_hash_with_manual_eq`.

There is also a new [future incompatibility warning](rust-lang/rust#103418)
which we hit in `fs_extra v1.2.0` and `wasmparser v0.78.2`.
I don't think we can get rid of the second anytime soon, assuming we
hang on to replayability.
  • Loading branch information
jakmeier committed Mar 14, 2023
1 parent d230eaf commit f3b7772
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -257,4 +257,4 @@ opt-level = 3
[workspace.package]
edition = "2021"
authors = ["Near Inc <hello@nearprotocol.com>"]
rust-version = "1.67.1"
rust-version = "1.68.0"
4 changes: 2 additions & 2 deletions core/crypto/src/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl PublicKey {

// This `Hash` implementation is safe since it retains the property
// `k1 == k2 ⇒ hash(k1) == hash(k2)`.
#[allow(clippy::derive_hash_xor_eq)]
#[allow(clippy::derived_hash_with_manual_eq)]
impl Hash for PublicKey {
fn hash<H: Hasher>(&self, state: &mut H) {
match self {
Expand Down Expand Up @@ -493,7 +493,7 @@ pub enum Signature {

// This `Hash` implementation is safe since it retains the property
// `k1 == k2 ⇒ hash(k1) == hash(k2)`.
#[allow(clippy::derive_hash_xor_eq)]
#[allow(clippy::derived_hash_with_manual_eq)]
impl Hash for Signature {
fn hash<H: Hasher>(&self, state: &mut H) {
match self {
Expand Down
2 changes: 1 addition & 1 deletion core/primitives-core/src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ impl fmt::Display for CryptoHash {

// This implementation is compatible with derived PartialEq.
// Custom PartialEq implementation was explicitly removed in #4220.
#[allow(clippy::derive_hash_xor_eq)]
#[allow(clippy::derived_hash_with_manual_eq)]
impl Hash for CryptoHash {
fn hash<H: Hasher>(&self, state: &mut H) {
state.write(self.as_ref());
Expand Down
2 changes: 1 addition & 1 deletion runtime/runtime-params-estimator/emu-cost/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# our local base image
FROM rust:1.67.1
FROM rust:1.68.0

LABEL description="Container for builds"

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# This specifies the version of Rust we use to build.
# Individual crates in the workspace may support a lower version, as indicated by `rust-version` field in each crate's `Cargo.toml`.
# The version specified below, should be at least as high as the maximum `rust-version` within the workspace.
channel = "1.67.1"
channel = "1.68.0"
components = [ "rustfmt" ]
targets = [ "wasm32-unknown-unknown" ]

0 comments on commit f3b7772

Please sign in to comment.