Skip to content

Commit 63e0d61

Browse files
committed
chore: update to rust 1.90.0
1 parent 861f844 commit 63e0d61

File tree

13 files changed

+61
-57
lines changed

13 files changed

+61
-57
lines changed

client/codegen/src/parser/calls.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ pub(super) fn parse_calls_module(
1515

1616
if let Some((_, items)) = &calls_mod.content {
1717
for item in items {
18-
if let Item::Impl(impl_item) = item {
19-
if is_api_impl(impl_item, "TransactionApi") {
20-
extract_calls(impl_item, &mut calls, pallet_name)?;
21-
}
18+
if let Item::Impl(impl_item) = item
19+
&& is_api_impl(impl_item, "TransactionApi")
20+
{
21+
extract_calls(impl_item, &mut calls, pallet_name)?;
2222
}
2323
}
2424
}

client/codegen/src/parser/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ fn parse_pallet_module(pallet_mod: &ItemMod) -> Result<PalletPattern, Box<dyn Er
9696
}
9797

9898
fn is_api_impl(impl_item: &ItemImpl, name: &'static str) -> bool {
99-
if let Type::Path(TypePath { path, .. }) = &*impl_item.self_ty {
100-
if let Some(segment) = path.segments.last() {
101-
return segment.ident == name;
102-
}
99+
if let Type::Path(TypePath { path, .. }) = &*impl_item.self_ty
100+
&& let Some(segment) = path.segments.last()
101+
{
102+
return segment.ident == name;
103103
}
104104
false
105105
}

client/codegen/src/parser/storage.rs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ pub(super) fn parse_storage_module(
1717

1818
// Find StorageApi implementation
1919
for item in items {
20-
if let Item::Impl(impl_item) = item {
21-
if is_api_impl(impl_item, "StorageApi") {
22-
let methods = extract_storage_methods(impl_item)?;
23-
patterns.extend(analyze_storage_methods(methods, &type_info, pallet_name)?);
24-
}
20+
if let Item::Impl(impl_item) = item
21+
&& is_api_impl(impl_item, "StorageApi")
22+
{
23+
let methods = extract_storage_methods(impl_item)?;
24+
patterns.extend(analyze_storage_methods(methods, &type_info, pallet_name)?);
2525
}
2626
}
2727
}
@@ -179,16 +179,15 @@ fn extract_type_info(items: &[Item]) -> Result<HashMap<String, TypeInfo>, Box<dy
179179

180180
// Find the types module
181181
for item in items {
182-
if let Item::Mod(types_mod) = item {
183-
if types_mod.ident == "types" {
184-
if let Some((_, type_items)) = &types_mod.content {
185-
for type_item in type_items {
186-
if let Item::Mod(storage_type_mod) = type_item {
187-
let storage_name = storage_type_mod.ident.to_string();
188-
let info = parse_storage_type_mod(storage_type_mod)?;
189-
type_info.insert(storage_name, info);
190-
}
191-
}
182+
if let Item::Mod(types_mod) = item
183+
&& types_mod.ident == "types"
184+
&& let Some((_, type_items)) = &types_mod.content
185+
{
186+
for type_item in type_items {
187+
if let Item::Mod(storage_type_mod) = type_item {
188+
let storage_name = storage_type_mod.ident.to_string();
189+
let info = parse_storage_type_mod(storage_type_mod)?;
190+
type_info.insert(storage_name, info);
192191
}
193192
}
194193
}

flake.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ build-testnet:
1111
# Development
1212

1313
check: fmt
14-
cargo clippy --tests
14+
cargo clippy --tests -- -D clippy::all
1515

1616
test: check
1717
SKIP_WASM_BUILD=1 cargo nextest run

mcp/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(dead_code)]
2+
13
#[cfg(all(feature = "testnet", feature = "devnet"))]
24
compile_error!("only one of the following features can be enabled at a time: testnet, devnet.");
35

node/src/chain_spec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fn testnet_genesis() -> Value {
6969
"balances": BalancesConfig { balances },
7070
"sudo": SudoConfig { key: Some(Sr25519Keyring::Alice.to_account_id()) },
7171
"aura": {
72-
"authorities": aura.iter().map(|x| (x.public().to_string())).collect::<Vec<_>>(),
72+
"authorities": aura.iter().map(|x| x.public().to_string()).collect::<Vec<_>>(),
7373
},
7474
"grandpa": {
7575
"authorities": grandpa.iter().map(|x| (x.public().to_string(), 1)).collect::<Vec<_>>(),

pallets/emission0/src/distribute/math.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ mod tests {
176176
transpose: bool,
177177
) -> Vec<Vec<(u16, FixedU128)>> {
178178
assert!(
179-
vector.len() % rows == 0,
179+
vector.len().is_multiple_of(rows),
180180
"Vector of len {:?} cannot reshape to {rows} rows.",
181181
vector.len()
182182
);

pallets/governance/src/application.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,10 @@ pub(crate) fn resolve_expired_applications<T: crate::Config>(current_block: Bloc
201201
}
202202

203203
crate::AgentApplications::<T>::mutate(application.id, |application| {
204-
if let Some(app) = application {
205-
if matches!(app.status, ApplicationStatus::Open) {
206-
app.status = ApplicationStatus::Expired;
207-
}
204+
if let Some(app) = application
205+
&& matches!(app.status, ApplicationStatus::Open)
206+
{
207+
app.status = ApplicationStatus::Expired;
208208
}
209209
});
210210

pallets/governance/src/proposal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ pub fn tick_proposals<T: crate::Config>(block_number: BlockNumberFor<T>) {
439439
.try_into()
440440
.ok()
441441
.expect("blocknumber wont be greater than 2^64");
442-
if block_number_u64 % 100 != 0 {
442+
if !block_number_u64.is_multiple_of(100) {
443443
return;
444444
}
445445

0 commit comments

Comments
 (0)