Skip to content

Commit

Permalink
Update rust to v1.74 (#2647)
Browse files Browse the repository at this point in the history
* upgrade rust to v1.74

* run fmt

* fix rustc warnings
  • Loading branch information
librelois authored Feb 14, 2024
1 parent a96e212 commit 5ba55f0
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions client/rpc/debug/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ where
let blockchain = backend.blockchain();
// Get the header I want to work with.
let Ok(hash) = client.expect_block_hash_from_id(&reference_id) else {
return Err(internal_err("Block header not found"))
return Err(internal_err("Block header not found"));
};
let header = match client.header(hash) {
Ok(Some(h)) => h,
Expand Down Expand Up @@ -453,7 +453,7 @@ where
let blockchain = backend.blockchain();
// Get the header I want to work with.
let Ok(reference_hash) = client.expect_block_hash_from_id(&reference_id) else {
return Err(internal_err("Block header not found"))
return Err(internal_err("Block header not found"));
};
let header = match client.header(reference_hash) {
Ok(Some(h)) => h,
Expand Down
4 changes: 2 additions & 2 deletions node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -911,8 +911,8 @@ where

let BlockImportPipeline::Parachain(block_import) = block_import else {
return Err(sc_service::Error::Other(
"Block import pipeline is not for parachain".into(),
))
"Block import pipeline is not for parachain".into(),
));
};

if collator {
Expand Down
3 changes: 2 additions & 1 deletion precompiles/proxy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ where
evm_subcall: EvmSubCall,
) -> EvmResult {
// Check that we only perform proxy calls on behalf of externally owned accounts
let AddressType::EOA = precompile_set::get_address_type::<Runtime>(handle, real.into())? else {
let AddressType::EOA = precompile_set::get_address_type::<Runtime>(handle, real.into())?
else {
return Err(revert("real address must be EOA"));
};

Expand Down
8 changes: 6 additions & 2 deletions precompiles/utils/macro/src/derive_codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ pub fn main(input: TokenStream) -> TokenStream {
..
} = parse_macro_input!(input as DeriveInput);

let syn::Data::Struct (syn::DataStruct {fields: syn::Fields::Named(fields), ..}) = data else {
let syn::Data::Struct(syn::DataStruct {
fields: syn::Fields::Named(fields),
..
}) = data
else {
return quote_spanned! { ident.span() =>
compile_error!("Codec can only be derived for structs with named fields");
}
.into()
.into();
};
let fields = fields.named;

Expand Down
1 change: 0 additions & 1 deletion runtime/moonriver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ pub type Precompiles = MoonriverPrecompiles<Runtime>;
pub mod asset_config;
pub mod governance;
pub mod xcm_config;
use governance::councils::*;

pub use governance::councils::*;

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.71.0"
channel = "1.74.0"
components = [ "rustfmt", "clippy" ]
targets = [ "wasm32-unknown-unknown" ]
profile = "minimal"

0 comments on commit 5ba55f0

Please sign in to comment.