Switch to Rust 2021 (#10170)

* Switch to Rust 2021

* Update trybuild to fix errors
This commit is contained in:
Bastian Köcher
2021-11-04 19:54:48 +01:00
committed by GitHub
parent 9fb9d7b8f0
commit b08d3017a8
245 changed files with 264 additions and 279 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-api"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -2,7 +2,7 @@
name = "sp-api-proc-macro"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -786,7 +786,7 @@ fn generate_runtime_info_impl(trait_: &ItemTrait, version: u64) -> TokenStream {
quote!(
#[cfg(any(feature = "std", test))]
impl < #( #impl_generics, )* > #crate_::RuntimeApiInfo
for #trait_name < #( #ty_generics, )* >
for dyn #trait_name < #( #ty_generics, )* >
{
#id
#version
-2
View File
@@ -644,8 +644,6 @@ pub const fn serialize_runtime_api_info(id: [u8; 8], version: u32) -> [u8; RUNTI
/// Deserialize the runtime API info serialized by [`serialize_runtime_api_info`].
pub fn deserialize_runtime_api_info(bytes: [u8; RUNTIME_API_INFO_SIZE]) -> ([u8; 8], u32) {
use sp_std::convert::TryInto;
let id: [u8; 8] = bytes[0..8]
.try_into()
.expect("the source slice size is equal to the dest array length; qed");
+2 -2
View File
@@ -2,7 +2,7 @@
name = "sp-api-test"
version = "2.0.1"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
publish = false
homepage = "https://substrate.io"
@@ -21,7 +21,7 @@ sp-consensus = { version = "0.10.0-dev", path = "../../consensus/common" }
sc-block-builder = { version = "0.10.0-dev", path = "../../../client/block-builder" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
sp-state-machine = { version = "0.10.0-dev", path = "../../state-machine" }
trybuild = "1.0.43"
trybuild = "1.0.52"
rustversion = "1.0.0"
[dev-dependencies]