Skip to content

Commit e0137a2

Browse files
authored
bump rust 1.84.1 (#2870)
* bump rust 1.84.1 * fix clippy * update * update * update ecosystem-modules/stable-asset * update tarpaulin
1 parent 7de9ac9 commit e0137a2

File tree

13 files changed

+16
-23
lines changed

13 files changed

+16
-23
lines changed

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ concurrency:
1818
cancel-in-progress: true
1919

2020
env:
21-
TARPAULIN_VERSION: 0.31.4
21+
TARPAULIN_VERSION: 0.32.3
2222
CARGO_INCREMENTAL: 0
2323
jobs:
2424
test:

evm-tests

modules/evm/src/precompiles/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ pub mod tests {
140140
}
141141
}
142142

143-
impl<'inner> PrecompileHandle for MockPrecompileHandle<'inner> {
143+
impl PrecompileHandle for MockPrecompileHandle<'_> {
144144
fn call(
145145
&mut self,
146146
_: H160,

modules/evm/src/runner/stack.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ impl<'vicinity, 'config, T: Config> SubstrateStackState<'vicinity, 'config, T> {
614614
}
615615
}
616616

617-
impl<'vicinity, 'config, T: Config> BackendT for SubstrateStackState<'vicinity, 'config, T> {
617+
impl<T: Config> BackendT for SubstrateStackState<'_, '_, T> {
618618
fn gas_price(&self) -> U256 {
619619
self.vicinity.gas_price
620620
}
@@ -707,7 +707,7 @@ impl<'vicinity, 'config, T: Config> BackendT for SubstrateStackState<'vicinity,
707707
}
708708
}
709709

710-
impl<'vicinity, 'config, T: Config> StackStateT<'config> for SubstrateStackState<'vicinity, 'config, T> {
710+
impl<'config, T: Config> StackStateT<'config> for SubstrateStackState<'_, 'config, T> {
711711
fn metadata(&self) -> &StackSubstateMetadata<'config> {
712712
self.substate.metadata()
713713
}
@@ -841,8 +841,7 @@ impl<'vicinity, 'config, T: Config> StackStateT<'config> for SubstrateStackState
841841
},
842842
|addr| {
843843
// inherent the published status from origin code address
844-
Pallet::<T>::accounts(addr)
845-
.map_or(false, |account| account.contract_info.map_or(false, |v| v.published))
844+
Pallet::<T>::accounts(addr).is_some_and(|account| account.contract_info.is_some_and(|v| v.published))
846845
},
847846
);
848847

modules/evm/src/runner/state.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,9 +1214,7 @@ impl<'config, 'precompiles, S: StackState<'config>, P: PrecompileSet> StackExecu
12141214
pub struct StackExecutorCallInterrupt<'borrow>(TaggedRuntime<'borrow>);
12151215
pub struct StackExecutorCreateInterrupt<'borrow>(TaggedRuntime<'borrow>);
12161216

1217-
impl<'config, 'precompiles, S: StackState<'config>, P: PrecompileSet> Handler
1218-
for StackExecutor<'config, 'precompiles, S, P>
1219-
{
1217+
impl<'config, S: StackState<'config>, P: PrecompileSet> Handler for StackExecutor<'config, '_, S, P> {
12201218
type CreateInterrupt = StackExecutorCreateInterrupt<'static>;
12211219
type CreateFeedback = Infallible;
12221220
type CallInterrupt = StackExecutorCallInterrupt<'static>;
@@ -1521,8 +1519,8 @@ pub struct StackExecutorHandle<'inner, 'config, 'precompiles, S, P> {
15211519
is_static: bool,
15221520
}
15231521

1524-
impl<'inner, 'config, 'precompiles, S: StackState<'config>, P: PrecompileSet> PrecompileHandle
1525-
for StackExecutorHandle<'inner, 'config, 'precompiles, S, P>
1522+
impl<'config, S: StackState<'config>, P: PrecompileSet> PrecompileHandle
1523+
for StackExecutorHandle<'_, 'config, '_, S, P>
15261524
{
15271525
// Perform subcall in provided context.
15281526
/// Precompile specifies in which context the subcall is executed.

modules/nft/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,9 +563,8 @@ impl<T: Config> Inspect<T::AccountId> for Pallet<T> {
563563
}
564564

565565
fn can_transfer(class: &Self::CollectionId, _: &Self::ItemId) -> bool {
566-
orml_nft::Pallet::<T>::classes(class).map_or(false, |class_info| {
567-
class_info.data.properties.0.contains(ClassProperty::Transferable)
568-
})
566+
orml_nft::Pallet::<T>::classes(class)
567+
.is_some_and(|class_info| class_info.data.properties.0.contains(ClassProperty::Transferable))
569568
}
570569
}
571570

primitives/src/evm.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ pub const SYSTEM_CONTRACT_ADDRESS_PREFIX: [u8; 9] = [0u8; 9];
173173
/// ^^^^^^^^ CurrencyId Type is 3-StableAsset, StableAssetPoolId
174174
/// ^^^^^^^^ CurrencyId Type is 4-LiquidCrowdloan, Lease
175175
/// ^^^^ CurrencyId Type is 5-ForeignAsset, ForeignAssetId
176-
177176
/// Check if the given `address` is a system contract.
178177
///
179178
/// It's system contract if the address starts with SYSTEM_CONTRACT_ADDRESS_PREFIX.

primitives/src/signature.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ impl Verify for AcalaMultiSignature {
107107
fn verify<L: Lazy<[u8]>>(&self, mut msg: L, signer: &AccountId32) -> bool {
108108
match (self, signer) {
109109
(Self::Ed25519(ref sig), who) => {
110-
ed25519::Public::from_slice(who.as_ref()).map_or(false, |signer| sig.verify(msg, &signer))
110+
ed25519::Public::from_slice(who.as_ref()).is_ok_and(|signer| sig.verify(msg, &signer))
111111
}
112112
(Self::Sr25519(ref sig), who) => {
113-
sr25519::Public::from_slice(who.as_ref()).map_or(false, |signer| sig.verify(msg, &signer))
113+
sr25519::Public::from_slice(who.as_ref()).is_ok_and(|signer| sig.verify(msg, &signer))
114114
}
115115
(Self::Ecdsa(ref sig), who) => {
116116
let m = sp_io::hashing::blake2_256(msg.get());

0 commit comments

Comments
 (0)