File tree Expand file tree Collapse file tree 2 files changed +12
-15
lines changed
Expand file tree Collapse file tree 2 files changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -7,18 +7,9 @@ export TARGET := "x86_64-unknown-linux-gnu"
77export RUSTV := " nightly-2024-03-05"
88export RELEASE_NAME := " development"
99
10- default :
11- @ echo " Running all tasks..."
12- fmt
13- check
14- test
15- benchmarks
16- clippy
17- fix
18-
1910fmt :
2011 @ echo " Running cargo fmt..."
21- cargo + {{ RUSTV}} fmt --check -- all
12+ cargo + {{ RUSTV}} fmt --all
2213
2314check :
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
4037fix :
4138 @ echo " Running cargo fix..."
4239 cargo + {{ RUSTV}} fix --workspace
Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments