Skip to content

Commit 43f0402

Browse files
author
Samuel Dare
committed
chore: lints
1 parent 59b0679 commit 43f0402

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export RUST_BACKTRACE := "full"
44
export SKIP_WASM_BUILD := "1"
55
export RUST_BIN_DIR := "target/x86_64-unknown-linux-gnu"
66
export TARGET := "x86_64-unknown-linux-gnu"
7-
export RUSTV := "nightly-2024-03-05"
7+
export RUSTV := "stable"
88
export RELEASE_NAME := "development"
99

1010
fmt:
@@ -25,13 +25,13 @@ benchmarks:
2525

2626
clippy:
2727
@echo "Running cargo clippy..."
28-
cargo +{{RUSTV}} clippy -- -D clippy::panic \
28+
cargo +{{RUSTV}} clippy --workspace --all-targets -- -D \
2929
-D clippy::todo \
3030
-D clippy::unimplemented
3131

3232
clippy-fix:
3333
@echo "Running cargo clippy with automatic fixes on potentially dirty code..."
34-
cargo +{{RUSTV}} clippy --fix --allow-dirty -- -A clippy::panic \
34+
cargo +{{RUSTV}} clippy --fix --allow-dirty --workspace --all-targets -- -A \
3535
-A clippy::todo \
3636
-A clippy::unimplemented
3737
fix:

pallets/subtensor/tests/block_step.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -920,17 +920,20 @@ fn test_epoch_runs_when_registration_disabled() {
920920
let block: u64 = 1;
921921
SubtensorModule::generate_emission(block);
922922

923-
step_block(1); // Now block 2
923+
step_block(1); // Now block 2
924924

925-
// Verify blocks since last step was set
926-
assert_eq!(SubtensorModule::get_blocks_since_last_step(netuid_off), 1);
925+
// Verify blocks since last step was set
926+
assert_eq!(SubtensorModule::get_blocks_since_last_step(netuid_off), 1);
927927

928928
// Step to the next epoch block
929929
let epoch_block: u16 = tempo;
930930
step_block(epoch_block);
931931

932-
// Verify blocks since last step was set, this indicates we ran the epoch
933-
assert_eq!(SubtensorModule::get_blocks_since_last_step(netuid_off), 0 as u64);
934-
assert!(SubtensorModule::get_loaded_emission_tuples(netuid_off).is_some());
932+
// Verify blocks since last step was set, this indicates we ran the epoch
933+
assert_eq!(
934+
SubtensorModule::get_blocks_since_last_step(netuid_off),
935+
0_u64
936+
);
937+
assert!(SubtensorModule::get_loaded_emission_tuples(netuid_off).is_some());
935938
});
936-
}
939+
}

0 commit comments

Comments
 (0)