Skip to content

Commit 9e88342

Browse files
authored
Fix some warnings emitted by new nightly rust (#2129)
* Add test and frequency-lint-check features to Cargo files * Add #[allow(dead_code)] to BlockWeight struct in frame-weight-template.hbs # Goal The goal of this PR is to fix some warnings generated by an updated nightly rust version. Closes #2009
1 parent 7b8c585 commit 9e88342

File tree

15 files changed

+20
-3
lines changed

15 files changed

+20
-3
lines changed

.maintain/frame-weight-template.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ mod tests {
127127
use common_runtime::constants::{MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO};
128128
use common_runtime::weights::extrinsic_weights::ExtrinsicBaseWeight;
129129

130+
#[allow(dead_code)]
130131
struct BlockWeights;
131132
impl Get<frame_system::limits::BlockWeights> for BlockWeights {
132133
fn get() -> frame_system::limits::BlockWeights {

common/primitives/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ std = [
4747
'sp-externalities/std',
4848
'sp-runtime-interface/std'
4949
]
50+
test = []

pallets/capacity/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ publish = false
99
repository = "https://github.com/frequency-chain/frequency/"
1010
version = "0.0.0"
1111

12+
1213
[package.metadata.docs.rs]
1314
targets = ["x86_64-unknown-linux-gnu"]
1415

@@ -53,3 +54,4 @@ std = [
5354
"sp-io/std",
5455
]
5556
try-runtime = ["frame-support/try-runtime"]
57+
test = []

pallets/frequency-tx-payment/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ std = [
6161
"sp-io/std",
6262
]
6363
try-runtime = ["frame-support/try-runtime"]
64+
test = []

pallets/handles/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ std = [
5858
'common-runtime/std',
5959
]
6060
try-runtime = ['frame-support/try-runtime']
61+
test = []

pallets/messages/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,4 @@ std = [
6060
'common-runtime/std',
6161
]
6262
try-runtime = ['frame-support/try-runtime']
63+
test = []

pallets/msa/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,4 @@ std = [
6868
"sp-io/std",
6969
]
7070
try-runtime = ["frame-support/try-runtime"]
71+
test = []

pallets/msa/src/runtime-api/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ std = [
2727
"frame-support/std",
2828
'common-primitives/std',
2929
]
30+
test = []

pallets/passkey/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ runtime-benchmarks = [
5959
"common-runtime/runtime-benchmarks",
6060
]
6161
try-runtime = ["frame-support/try-runtime", "frame-system/try-runtime"]
62+
test = []

pallets/schemas/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ std = [
6161
'sp-io/std',
6262
]
6363
try-runtime = ["frame-support/try-runtime"]
64+
test = []

pallets/stateful-storage/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ std = [
5757
"common-runtime/std",
5858
]
5959
try-runtime = ['frame-support/try-runtime']
60+
test = []

pallets/time-release/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,4 @@ runtime-benchmarks = [
5353
"common-runtime/runtime-benchmarks",
5454
]
5555
try-runtime = ["frame-support/try-runtime", "frame-system/try-runtime"]
56+
test = []

runtime/common/src/weights/pallet_utility.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ mod tests {
8686
use crate::constants::{MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO};
8787
use crate::weights::extrinsic_weights::ExtrinsicBaseWeight;
8888

89-
struct BlockWeights;
89+
#[allow(dead_code)]
90+
struct BlockWeights;
9091
impl Get<frame_system::limits::BlockWeights> for BlockWeights {
9192
fn get() -> frame_system::limits::BlockWeights {
9293
frame_system::limits::BlockWeights::builder()

runtime/frequency/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,3 +253,6 @@ on-chain-release-build = ["metadata-hash", "sp-api/disable-logging"]
253253
# `RUNTIME_METADATA_HASH` environment variable set for the `CheckMetadataHash`
254254
# extension.
255255
metadata-hash = ["substrate-wasm-builder/metadata-hash"]
256+
frequency-lint-check = []
257+
test = []
258+
parameterized-consensus-hook = []

runtime/frequency/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
360360
spec_name: create_runtime_str!("frequency"),
361361
impl_name: create_runtime_str!("frequency"),
362362
authoring_version: 1,
363-
spec_version: 106,
363+
spec_version: 107,
364364
impl_version: 0,
365365
apis: apis::RUNTIME_API_VERSIONS,
366366
transaction_version: 1,
@@ -374,7 +374,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
374374
spec_name: create_runtime_str!("frequency-testnet"),
375375
impl_name: create_runtime_str!("frequency"),
376376
authoring_version: 1,
377-
spec_version: 106,
377+
spec_version: 107,
378378
impl_version: 0,
379379
apis: apis::RUNTIME_API_VERSIONS,
380380
transaction_version: 1,

0 commit comments

Comments
 (0)