From ac53a97002ed5c7b207d422e9f4412807770afb5 Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Sat, 2 Mar 2024 17:51:59 +0800 Subject: [PATCH] run taplo fmt --- .cargo/config.toml | 16 +- .maintain/zombienet-config.toml | 2 +- Cargo.toml | 5 +- node/Cargo.toml | 22 +- runtime/bajun/Cargo.toml | 386 ++++++++++++++++---------------- rust-toolchain.toml | 8 +- rustfmt.toml | 10 +- 7 files changed, 224 insertions(+), 225 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index ad56242..1685b35 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,13 +1,13 @@ [alias] -build-bajun = "build --release --no-default-features --bin bajun-node" -build-bajun-benchmarks = [ "build-bajun", "--features", "runtime-benchmarks" ] +build-bajun = "build --release --no-default-features --bin bajun-node" +build-bajun-benchmarks = ["build-bajun", "--features", "runtime-benchmarks"] [target.'cfg(feature = "cargo-clippy")'] rustflags = [ - "-Aclippy::derive_partial_eq_without_eq", - "-Aclippy::too_many_arguments", - "-Aclippy::type_complexity", - "-Aclippy::uninlined-format-args", - "-Aclippy::unnecessary_cast", - "-Aclippy::large_enum_variant", + "-Aclippy::derive_partial_eq_without_eq", + "-Aclippy::too_many_arguments", + "-Aclippy::type_complexity", + "-Aclippy::uninlined-format-args", + "-Aclippy::unnecessary_cast", + "-Aclippy::large_enum_variant", ] diff --git a/.maintain/zombienet-config.toml b/.maintain/zombienet-config.toml index ae5a0db..974eddd 100644 --- a/.maintain/zombienet-config.toml +++ b/.maintain/zombienet-config.toml @@ -3,7 +3,7 @@ timeout = 120 [relaychain] default_command = "./zombienet-tests/bin/polkadot" -default_args = [ "-lparachain=debug" ] +default_args = ["-lparachain=debug"] chain = "rococo-local" [[relaychain.nodes]] diff --git a/Cargo.toml b/Cargo.toml index 917791f..6bc574d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,10 +7,7 @@ version = "0.2.2" [workspace] resolver = "2" -members = [ - "node", - "runtime/bajun", -] +members = ["node", "runtime/bajun"] [workspace.dependencies] # General diff --git a/node/Cargo.toml b/node/Cargo.toml index fedb650..de1871a 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -76,17 +76,17 @@ substrate-build-script-utils = { workspace = true } [features] default = [] runtime-benchmarks = [ - "cumulus-primitives-core/runtime-benchmarks", - "frame-benchmarking-cli/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "bajun-runtime/runtime-benchmarks", - "polkadot-cli/runtime-benchmarks", - "polkadot-primitives/runtime-benchmarks", - "sc-service/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", + "frame-benchmarking-cli/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "bajun-runtime/runtime-benchmarks", + "polkadot-cli/runtime-benchmarks", + "polkadot-primitives/runtime-benchmarks", + "sc-service/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", ] try-runtime = [ - "bajun-runtime/try-runtime", - "polkadot-cli/try-runtime", - "sp-runtime/try-runtime", + "bajun-runtime/try-runtime", + "polkadot-cli/try-runtime", + "sp-runtime/try-runtime", ] diff --git a/runtime/bajun/Cargo.toml b/runtime/bajun/Cargo.toml index ab317a3..841b30c 100644 --- a/runtime/bajun/Cargo.toml +++ b/runtime/bajun/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "bajun-runtime" -authors.workspace = true -edition.workspace = true -homepage.workspace = true +authors.workspace = true +edition.workspace = true +homepage.workspace = true repository.workspace = true -version.workspace = true +version.workspace = true [build-dependencies] substrate-wasm-builder = { workspace = true } @@ -13,221 +13,223 @@ substrate-wasm-builder = { workspace = true } [dependencies] # General hex-literal = { workspace = true, optional = true } -log = { workspace = true } -serde = { workspace = true, features = [ "derive" ], optional = true } -smallvec = { workspace = true } +log = { workspace = true } +serde = { workspace = true, features = ["derive"], optional = true } +smallvec = { workspace = true } # Parity codec parity-scale-codec = { workspace = true } -scale-info = { workspace = true, features = [ "derive" ] } +scale-info = { workspace = true, features = ["derive"] } # Substrate -frame-benchmarking = { workspace = true, optional = true } -frame-executive = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -frame-system-benchmarking = { workspace = true, optional = true } -frame-system-rpc-runtime-api = { workspace = true } -frame-try-runtime = { workspace = true, optional = true } -pallet-aura = { workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } -pallet-collective = { workspace = true } -pallet-democracy = { workspace = true } -pallet-identity = { workspace = true } +frame-benchmarking = { workspace = true, optional = true } +frame-executive = { workspace = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +frame-system-benchmarking = { workspace = true, optional = true } +frame-system-rpc-runtime-api = { workspace = true } +frame-try-runtime = { workspace = true, optional = true } +pallet-aura = { workspace = true } +pallet-authorship = { workspace = true } +pallet-balances = { workspace = true } +pallet-collective = { workspace = true } +pallet-democracy = { workspace = true } +pallet-identity = { workspace = true } pallet-insecure-randomness-collective-flip = { workspace = true } -pallet-membership = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-multisig = { workspace = true } -pallet-nfts = { workspace = true } -pallet-preimage = { workspace = true } -pallet-proxy = { workspace = true } -pallet-scheduler = { workspace = true } -pallet-session = { workspace = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } +pallet-membership = { workspace = true } +pallet-message-queue = { workspace = true } +pallet-multisig = { workspace = true } +pallet-nfts = { workspace = true } +pallet-preimage = { workspace = true } +pallet-proxy = { workspace = true } +pallet-scheduler = { workspace = true } +pallet-session = { workspace = true } +pallet-sudo = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-treasury = { workspace = true } -pallet-utility = { workspace = true } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-std = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } +pallet-treasury = { workspace = true } +pallet-utility = { workspace = true } +sp-api = { workspace = true } +sp-block-builder = { workspace = true } +sp-consensus-aura = { workspace = true } +sp-core = { workspace = true } +sp-genesis-builder = { workspace = true } +sp-inherents = { workspace = true } +sp-io = { workspace = true } +sp-offchain = { workspace = true } +sp-runtime = { workspace = true } +sp-session = { workspace = true } +sp-std = { workspace = true } +sp-storage = { workspace = true } +sp-transaction-pool = { workspace = true } +sp-version = { workspace = true } # Polkadot -pallet-xcm = { workspace = true } +pallet-xcm = { workspace = true } polkadot-parachain-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -staging-xcm = { workspace = true } -staging-xcm-builder = { workspace = true } -staging-xcm-executor = { workspace = true } +polkadot-runtime-common = { workspace = true } +staging-xcm = { workspace = true } +staging-xcm-builder = { workspace = true } +staging-xcm-executor = { workspace = true } # Cumulus -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true, features = [ "parameterized-consensus-hook" ] } +cumulus-pallet-aura-ext = { workspace = true } +cumulus-pallet-parachain-system = { workspace = true, features = [ + "parameterized-consensus-hook", +] } cumulus-pallet-session-benchmarking = { workspace = true } -cumulus-pallet-xcm = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -cumulus-primitives-aura = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-utility = { workspace = true } -pallet-collator-selection = { workspace = true } -parachains-common = { workspace = true } -staging-parachain-info = { workspace = true } +cumulus-pallet-xcm = { workspace = true } +cumulus-pallet-xcmp-queue = { workspace = true } +cumulus-primitives-aura = { workspace = true } +cumulus-primitives-core = { workspace = true } +cumulus-primitives-utility = { workspace = true } +pallet-collator-selection = { workspace = true } +parachains-common = { workspace = true } +staging-parachain-info = { workspace = true } # ORML orml-vesting = { workspace = true } # Ajuna Pallets -pallet-ajuna-awesome-avatars = { workspace = true } +pallet-ajuna-awesome-avatars = { workspace = true } pallet-ajuna-awesome-avatars-benchmarking = { workspace = true, optional = true } -pallet-ajuna-nft-transfer = { workspace = true } +pallet-ajuna-nft-transfer = { workspace = true } [features] -default = [ "std" ] +default = ["std"] std = [ - "parity-scale-codec/std", - "log/std", - "scale-info/std", - "serde/std", - "cumulus-pallet-aura-ext/std", - "cumulus-pallet-parachain-system/std", - "cumulus-pallet-xcm/std", - "cumulus-pallet-xcmp-queue/std", - "cumulus-primitives-aura/std", - "cumulus-primitives-core/std", - "cumulus-primitives-utility/std", - "frame-executive/std", - "frame-support/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "frame-try-runtime/std", - "orml-vesting/std", - "pallet-ajuna-awesome-avatars/std", - "pallet-ajuna-awesome-avatars-benchmarking?/std", - "pallet-ajuna-nft-transfer/std", - "pallet-aura/std", - "pallet-authorship/std", - "pallet-balances/std", - "pallet-collective/std", - "pallet-collator-selection/std", - "pallet-democracy/std", - "pallet-identity/std", - "pallet-membership/std", - "pallet-message-queue/std", - "pallet-multisig/std", - "pallet-nfts/std", - "pallet-preimage/std", - "pallet-proxy/std", - "pallet-insecure-randomness-collective-flip/std", - "pallet-scheduler/std", - "pallet-session/std", - "pallet-sudo/std", - "pallet-timestamp/std", - "pallet-treasury/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-utility/std", - "pallet-xcm/std", - "parachains-common/std", - "staging-parachain-info/std", - "polkadot-parachain-primitives/std", - "polkadot-runtime-common/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-aura/std", - "sp-core/std", - "sp-inherents/std", - "sp-io/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-storage/std", - "sp-transaction-pool/std", - "sp-version/std", - "staging-xcm/std", - "staging-xcm-builder/std", - "staging-xcm-executor/std", + "parity-scale-codec/std", + "log/std", + "scale-info/std", + "serde/std", + "cumulus-pallet-aura-ext/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", + "cumulus-primitives-aura/std", + "cumulus-primitives-core/std", + "cumulus-primitives-utility/std", + "frame-executive/std", + "frame-support/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "frame-try-runtime/std", + "orml-vesting/std", + "pallet-ajuna-awesome-avatars/std", + "pallet-ajuna-awesome-avatars-benchmarking?/std", + "pallet-ajuna-nft-transfer/std", + "pallet-aura/std", + "pallet-authorship/std", + "pallet-balances/std", + "pallet-collective/std", + "pallet-collator-selection/std", + "pallet-democracy/std", + "pallet-identity/std", + "pallet-membership/std", + "pallet-message-queue/std", + "pallet-multisig/std", + "pallet-nfts/std", + "pallet-preimage/std", + "pallet-proxy/std", + "pallet-insecure-randomness-collective-flip/std", + "pallet-scheduler/std", + "pallet-session/std", + "pallet-sudo/std", + "pallet-timestamp/std", + "pallet-treasury/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-utility/std", + "pallet-xcm/std", + "parachains-common/std", + "staging-parachain-info/std", + "polkadot-parachain-primitives/std", + "polkadot-runtime-common/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-aura/std", + "sp-core/std", + "sp-inherents/std", + "sp-io/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-storage/std", + "sp-transaction-pool/std", + "sp-version/std", + "staging-xcm/std", + "staging-xcm-builder/std", + "staging-xcm-executor/std", ] runtime-benchmarks = [ - "hex-literal", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system-benchmarking/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "orml-vesting/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-collator-selection/runtime-benchmarks", - "pallet-collective/runtime-benchmarks", - "pallet-democracy/runtime-benchmarks", - "pallet-identity/runtime-benchmarks", - "pallet-membership/runtime-benchmarks", - "pallet-message-queue/runtime-benchmarks", - "pallet-multisig/runtime-benchmarks", - "pallet-nfts/runtime-benchmarks", - "pallet-preimage/runtime-benchmarks", - "pallet-proxy/runtime-benchmarks", - "pallet-scheduler/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-treasury/runtime-benchmarks", - "pallet-utility/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "staging-xcm-builder/runtime-benchmarks", - "cumulus-pallet-parachain-system/runtime-benchmarks", - "cumulus-pallet-session-benchmarking/runtime-benchmarks", - "cumulus-pallet-xcmp-queue/runtime-benchmarks", - "pallet-ajuna-awesome-avatars-benchmarking/runtime-benchmarks", - "pallet-ajuna-nft-transfer/runtime-benchmarks", + "hex-literal", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "orml-vesting/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-collator-selection/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-democracy/runtime-benchmarks", + "pallet-identity/runtime-benchmarks", + "pallet-membership/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-nfts/runtime-benchmarks", + "pallet-preimage/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "staging-xcm-builder/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-pallet-session-benchmarking/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "pallet-ajuna-awesome-avatars-benchmarking/runtime-benchmarks", + "pallet-ajuna-nft-transfer/runtime-benchmarks", ] try-runtime = [ - "cumulus-pallet-aura-ext/try-runtime", - "cumulus-pallet-parachain-system/try-runtime", - "cumulus-pallet-xcm/try-runtime", - "cumulus-pallet-xcmp-queue/try-runtime", - "frame-executive/try-runtime", - "frame-system/try-runtime", - "frame-try-runtime/try-runtime", - "orml-vesting/try-runtime", - "pallet-aura/try-runtime", - "pallet-authorship/try-runtime", - "pallet-balances/try-runtime", - "pallet-collator-selection/try-runtime", - "pallet-collective/try-runtime", - "pallet-democracy/try-runtime", - "pallet-identity/try-runtime", - "pallet-membership/try-runtime", - "pallet-message-queue/try-runtime", - "pallet-multisig/try-runtime", - "pallet-nfts/try-runtime", - "pallet-preimage/try-runtime", - "pallet-proxy/try-runtime", - "pallet-insecure-randomness-collective-flip/try-runtime", - "pallet-scheduler/try-runtime", - "pallet-session/try-runtime", - "pallet-sudo/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-transaction-payment/try-runtime", - "pallet-treasury/try-runtime", - "pallet-utility/try-runtime", - "pallet-xcm/try-runtime", - "staging-parachain-info/try-runtime", - "pallet-ajuna-awesome-avatars/try-runtime", - "pallet-ajuna-nft-transfer/try-runtime", + "cumulus-pallet-aura-ext/try-runtime", + "cumulus-pallet-parachain-system/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "frame-executive/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime/try-runtime", + "orml-vesting/try-runtime", + "pallet-aura/try-runtime", + "pallet-authorship/try-runtime", + "pallet-balances/try-runtime", + "pallet-collator-selection/try-runtime", + "pallet-collective/try-runtime", + "pallet-democracy/try-runtime", + "pallet-identity/try-runtime", + "pallet-membership/try-runtime", + "pallet-message-queue/try-runtime", + "pallet-multisig/try-runtime", + "pallet-nfts/try-runtime", + "pallet-preimage/try-runtime", + "pallet-proxy/try-runtime", + "pallet-insecure-randomness-collective-flip/try-runtime", + "pallet-scheduler/try-runtime", + "pallet-session/try-runtime", + "pallet-sudo/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-transaction-payment/try-runtime", + "pallet-treasury/try-runtime", + "pallet-utility/try-runtime", + "pallet-xcm/try-runtime", + "staging-parachain-info/try-runtime", + "pallet-ajuna-awesome-avatars/try-runtime", + "pallet-ajuna-nft-transfer/try-runtime", ] -experimental = [ "pallet-aura/experimental" ] +experimental = ["pallet-aura/experimental"] diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 42129d0..44d4ccb 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "1.74.1" -components = [ "clippy", "rustfmt", "rust-src" ] -profile = "minimal" -targets = [ "wasm32-unknown-unknown" ] +channel = "1.74.1" +components = ["clippy", "rustfmt", "rust-src"] +profile = "minimal" +targets = ["wasm32-unknown-unknown"] diff --git a/rustfmt.toml b/rustfmt.toml index 2b1327d..c3783c7 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,6 +1,6 @@ # Basic -hard_tabs = true -max_width = 100 +hard_tabs = true +max_width = 100 use_small_heuristics = "Max" # Imports reorder_imports = true @@ -8,7 +8,7 @@ reorder_modules = true # Consistency newline_style = "Unix" # Misc -chain_width = 80 -match_arm_leading_pipes = "Preserve" +chain_width = 80 +match_arm_leading_pipes = "Preserve" match_block_trailing_comma = true -use_field_init_shorthand = true +use_field_init_shorthand = true