File tree 4 files changed +124
-166
lines changed
4 files changed +124
-166
lines changed Original file line number Diff line number Diff line change
1
+ # EXAMPLE USAGE
2
+ # Refer for explanation to following link:
3
+ # https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md
4
+
1
5
pre-commit :
6
+ parallel : true
2
7
commands :
3
- lint_code :
4
- glob : ' *.dart'
8
+ dart_fix :
9
+ glob : " *.dart"
5
10
run : dart fix lib --apply && git add .
6
- format_code :
7
- glob : ' *.dart'
11
+ dart_format :
12
+ glob : " *.dart"
8
13
run : dart format . && git add .
14
+ rust_format :
15
+ glob : " *.rs"
16
+ run : cd rust && cargo fmt && git add .
9
17
10
18
pre-push :
11
19
parallel : true
12
20
commands :
13
- tests :
14
- run : flutter test
15
- static_code_analysis :
16
- run : flutter analyze
21
+ # flutter_test:
22
+ # run: flutter test
23
+ # rust_test:
24
+ # run: cargo test
25
+ flutter_analyze :
26
+ run : flutter analyze
27
+ # rust_clippy:
28
+ # run: cd rust && cargo clippy -- -D warnings
Original file line number Diff line number Diff line change @@ -8,13 +8,13 @@ pub struct FfiConnection(pub RustOpaque<std::sync::Mutex<bdk_wallet::rusqlite::C
8
8
9
9
impl FfiConnection {
10
10
pub fn new ( path : String ) -> Result < Self , SqliteError > {
11
- let mut connection = bdk_wallet:: rusqlite:: Connection :: open ( path) ?;
11
+ let connection = bdk_wallet:: rusqlite:: Connection :: open ( path) ?;
12
12
connection. busy_timeout ( Duration :: from_secs ( 30 ) ) ?;
13
13
Ok ( Self ( RustOpaque :: new ( std:: sync:: Mutex :: new ( connection) ) ) )
14
14
}
15
15
16
16
pub fn new_in_memory ( ) -> Result < Self , SqliteError > {
17
- let mut connection = bdk_wallet:: rusqlite:: Connection :: open_in_memory ( ) ?;
17
+ let connection = bdk_wallet:: rusqlite:: Connection :: open_in_memory ( ) ?;
18
18
connection. busy_timeout ( Duration :: from_secs ( 30 ) ) ?;
19
19
Ok ( Self ( RustOpaque :: new ( std:: sync:: Mutex :: new ( connection) ) ) )
20
20
}
You can’t perform that action at this time.
0 commit comments