Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

add cargo fmt to ci #75

Merged
merged 2 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ jobs:
- uses: ./.github/actions/cache
with:
cache-key: lint
- name: check format
run: |
cargo fmt --all --check
- name: install clippy
run: |
rustup component add clippy

- name: Check clippy
run: |
cargo clippy --all-targets --workspace --features runtime-benchmarks --features try-runtime
Expand Down
2 changes: 1 addition & 1 deletion node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ pub fn run() -> Result<()> {
AccountIdConversion::<polkadot_primitives::v4::AccountId>::into_account_truncating(&id);

let state_version = Cli::native_runtime_version(&config.chain_spec).state_version();

#[allow(clippy::redundant_clone)]
let block: Block = generate_genesis_block(&*config.chain_spec, state_version)
.map_err(|e| e.to_string())?;
Expand Down
4 changes: 2 additions & 2 deletions pallets/living-assets-ownership/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mod test {
use super::*;

type AccountId = <Test as frame_system::Config>::AccountId;
type CollectionId = <Test as crate::Config>::CollectionId;
type CollectionId = <Test as crate::Config>::CollectionId;

#[test]
fn owner_of_unexistent_collection_is_none() {
Expand Down Expand Up @@ -48,7 +48,7 @@ mod test {

#[test]
fn living_assets_ownership_trait_create_new_collection_by_living() {
new_test_ext().execute_with(|| {
new_test_ext().execute_with(|| {
let result = <LivingAssetsModule as LivingAssetsOwnership<AccountId, CollectionId>>::create_collection(0, 1);
assert_ok!(result);
assert_eq!(LivingAssetsModule::owner_of_collection(0), Some(1));
Expand Down