Skip to content

Commit 4072973

Browse files
author
Samuel Dare
committed
chore: remove default from justfile , lint
1 parent ed24984 commit 4072973

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

justfile

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,9 @@ export TARGET := "x86_64-unknown-linux-gnu"
77
export RUSTV := "nightly-2024-03-05"
88
export RELEASE_NAME := "development"
99

10-
default:
11-
@echo "Running all tasks..."
12-
fmt
13-
check
14-
test
15-
benchmarks
16-
clippy
17-
fix
18-
1910
fmt:
2011
@echo "Running cargo fmt..."
21-
cargo +{{RUSTV}} fmt --check --all
12+
cargo +{{RUSTV}} fmt --all
2213

2314
check:
2415
@echo "Running cargo check..."
@@ -37,6 +28,12 @@ clippy:
3728
cargo +{{RUSTV}} clippy -- -D clippy::panic \
3829
-D clippy::todo \
3930
-D clippy::unimplemented
31+
32+
clippy-fix:
33+
@echo "Running cargo clippy with automatic fixes on potentially dirty code..."
34+
cargo +{{RUSTV}} clippy --fix --allow-dirty -- -A clippy::panic \
35+
-A clippy::todo \
36+
-A clippy::unimplemented
4037
fix:
4138
@echo "Running cargo fix..."
4239
cargo +{{RUSTV}} fix --workspace

pallets/subtensor/src/staking.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -537,13 +537,13 @@ impl<T: Config> Pallet<T> {
537537
}
538538

539539
// This bit is currently untested. @todo
540-
let can_withdraw = T::Currency::can_withdraw(
541-
&coldkey,
540+
541+
T::Currency::can_withdraw(
542+
coldkey,
542543
amount,
543544
)
544545
.into_result(false)
545-
.is_ok();
546-
can_withdraw
546+
.is_ok()
547547
}
548548

549549
pub fn get_coldkey_balance(
@@ -569,7 +569,7 @@ impl<T: Config> Pallet<T> {
569569
}
570570

571571
let credit = T::Currency::withdraw(
572-
&coldkey,
572+
coldkey,
573573
amount,
574574
Precision::BestEffort,
575575
Preservation::Preserve,

0 commit comments

Comments
 (0)