diff --git a/network/src/lib.rs b/network/src/lib.rs index 51d4e7a1e1..264527c5d3 100644 --- a/network/src/lib.rs +++ b/network/src/lib.rs @@ -1,7 +1,7 @@ #![deny(unsafe_code)] #![cfg_attr(test, deny(rust_2018_idioms))] #![cfg_attr(test, deny(warnings))] -#![feature(try_trait, const_if_match)] +#![feature(try_trait)] //! Crate to handle high level networking of messages with different //! requirements and priorities over a number of protocols diff --git a/network/src/message.rs b/network/src/message.rs index 03626f22d3..a8c9eb1612 100644 --- a/network/src/message.rs +++ b/network/src/message.rs @@ -112,26 +112,14 @@ pub(crate) fn partial_eq_bincode(first: &bincode::ErrorKind, second: &bincode::E bincode::ErrorKind::InvalidBoolEncoding(s) => f == s, _ => false, }, - bincode::ErrorKind::InvalidCharEncoding => match *second { - bincode::ErrorKind::InvalidCharEncoding => true, - _ => false, - }, + bincode::ErrorKind::InvalidCharEncoding => matches!(*second, bincode::ErrorKind::InvalidCharEncoding), bincode::ErrorKind::InvalidTagEncoding(f) => match *second { bincode::ErrorKind::InvalidTagEncoding(s) => f == s, _ => false, }, - bincode::ErrorKind::DeserializeAnyNotSupported => match *second { - bincode::ErrorKind::DeserializeAnyNotSupported => true, - _ => false, - }, - bincode::ErrorKind::SizeLimit => match *second { - bincode::ErrorKind::SizeLimit => true, - _ => false, - }, - bincode::ErrorKind::SequenceMustHaveLength => match *second { - bincode::ErrorKind::SequenceMustHaveLength => true, - _ => false, - }, + bincode::ErrorKind::DeserializeAnyNotSupported => matches!(*second, bincode::ErrorKind::DeserializeAnyNotSupported), + bincode::ErrorKind::SizeLimit => matches!(*second, bincode::ErrorKind::SizeLimit), + bincode::ErrorKind::SequenceMustHaveLength => matches!(*second, bincode::ErrorKind::SequenceMustHaveLength), bincode::ErrorKind::Custom(ref f) => match *second { bincode::ErrorKind::Custom(ref s) => f == s, _ => false, diff --git a/rust-toolchain b/rust-toolchain index 38819f8f09..83d79d2890 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2020-06-22 +nightly-2020-08-15