Skip to content

Commit

Permalink
rust version upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Freddy Li authored and Freddy Li committed Aug 1, 2024
1 parent 5671e14 commit 3ceb789
Show file tree
Hide file tree
Showing 13 changed files with 1,123 additions and 1,026 deletions.
2,121 changes: 1,116 additions & 1,005 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions access-segregator/src/mock.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// The Licensed Work is (c) 2022 Sygma
// SPDX-License-Identifier: LGPL-3.0-only

#![cfg(test)]

use frame_support::{
pallet_prelude::ConstU32,
parameter_types,
Expand Down
2 changes: 0 additions & 2 deletions basic-fee-handler/src/mock.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// The Licensed Work is (c) 2022 Sygma
// SPDX-License-Identifier: LGPL-3.0-only

#![cfg(test)]

use frame_support::{
pallet_prelude::ConstU32,
parameter_types,
Expand Down
2 changes: 0 additions & 2 deletions bridge-forwarder/src/mock.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// The Licensed Work is (c) 2022 Sygma
// SPDX-License-Identifier: LGPL-3.0-only

#![cfg(test)]

use cumulus_primitives_core::ParaId;

use std::marker::PhantomData;
Expand Down
6 changes: 3 additions & 3 deletions bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ pub mod pallet {
}
}

let final_keccak_data_input = &vec![SolidityDataType::Bytes(&final_keccak_data)];
let final_keccak_data_input = &[SolidityDataType::Bytes(&final_keccak_data)];
let bytes = encode_packed(final_keccak_data_input);
let hashed_keccak_data = keccak_256(bytes.as_slice());

Expand All @@ -798,7 +798,7 @@ pub mod pallet {
};
let domain_separator = eip712_domain.separator();

let typed_data_hash_input = &vec![
let typed_data_hash_input = &[
SolidityDataType::String("\x19\x01"),
SolidityDataType::Bytes(&domain_separator),
SolidityDataType::Bytes(&struct_hash),
Expand Down Expand Up @@ -837,7 +837,7 @@ pub mod pallet {
/// recipient data bytes bytes 64 - END
///
/// Only fungible transfer is supported so far.
fn extract_deposit_data(data: &Vec<u8>) -> Result<(u128, MultiLocation), DispatchError> {
fn extract_deposit_data(data: &[u8]) -> Result<(u128, MultiLocation), DispatchError> {
if data.len() < 64 {
return Err(Error::<T>::InvalidDepositData.into());
}
Expand Down
2 changes: 0 additions & 2 deletions bridge/src/mock.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// The Licensed Work is (c) 2022 Sygma
// SPDX-License-Identifier: LGPL-3.0-only

#![cfg(test)]

use crate as sygma_bridge;
use fixed::{types::extra::U16, FixedU128};
use frame_support::{
Expand Down
2 changes: 0 additions & 2 deletions fee-handler-router/src/mock.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// The Licensed Work is (c) 2022 Sygma
// SPDX-License-Identifier: LGPL-3.0-only

#![cfg(test)]

use frame_support::{
pallet_prelude::ConstU32,
parameter_types,
Expand Down
2 changes: 0 additions & 2 deletions percentage-fee-handler/src/mock.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// The Licensed Work is (c) 2022 Sygma
// SPDX-License-Identifier: LGPL-3.0-only

#![cfg(test)]

use frame_support::{
pallet_prelude::ConstU32,
parameter_types,
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.74.0"
channel = "1.79.0"
components = ["rustfmt"]
targets = ["wasm32-unknown-unknown"]
2 changes: 1 addition & 1 deletion substrate-node/parachain/node/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::sync::Arc;
use parachain_template_runtime::{opaque::Block, AccountId, Balance, Nonce};

use sc_client_api::AuxStore;
pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor};
pub use sc_rpc::DenyUnsafe;
use sc_transaction_pool_api::TransactionPool;
use sp_api::ProvideRuntimeApi;
use sp_block_builder::BlockBuilder;
Expand Down
2 changes: 1 addition & 1 deletion substrate-node/parachain/runtime/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ pub mod rocksdb_weights;

pub use block_weights::constants::BlockExecutionWeight;
pub use extrinsic_weights::constants::ExtrinsicBaseWeight;
pub use paritydb_weights::constants::ParityDbWeight;
// pub use paritydb_weights::constants::ParityDbWeight;
pub use rocksdb_weights::constants::RocksDbWeight;
2 changes: 0 additions & 2 deletions xcm-bridge/src/mock/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// The Licensed Work is (c) 2022 Sygma
// SPDX-License-Identifier: LGPL-3.0-only

#![cfg(test)]

use frame_support::sp_runtime::{AccountId32, BuildStorage};
use sp_io::TestExternalities;
use xcm_simulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain, TestExt};
Expand Down
2 changes: 1 addition & 1 deletion xcm-bridge/src/mock/para.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ impl GetChannelInfo for ChannelInfo {
ChannelStatus::Ready(10, 10)
}
fn get_channel_max(_id: ParaId) -> Option<usize> {
Some(usize::max_value())
Some(usize::MAX)
}
}

Expand Down

0 comments on commit 3ceb789

Please sign in to comment.