Skip to content

Commit 15a1987

Browse files
authored
Merge pull request #165 from StaxoLotl/refactor/v1.0.0-beta.4
Refactor/v1.0.0 beta.4
2 parents fe98c51 + cb25f4f commit 15a1987

File tree

4 files changed

+124
-166
lines changed

4 files changed

+124
-166
lines changed

lefthook.yml

+20-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
1+
# EXAMPLE USAGE
2+
# Refer for explanation to following link:
3+
# https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md
4+
15
pre-commit:
6+
parallel: true
27
commands:
3-
lint_code:
4-
glob: '*.dart'
8+
dart_fix:
9+
glob: "*.dart"
510
run: dart fix lib --apply && git add .
6-
format_code:
7-
glob: '*.dart'
11+
dart_format:
12+
glob: "*.dart"
813
run: dart format . && git add .
14+
rust_format:
15+
glob: "*.rs"
16+
run: cd rust && cargo fmt && git add .
917

1018
pre-push:
1119
parallel: true
1220
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

rust/src/api/store.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ pub struct FfiConnection(pub RustOpaque<std::sync::Mutex<bdk_wallet::rusqlite::C
88

99
impl FfiConnection {
1010
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)?;
1212
connection.busy_timeout(Duration::from_secs(30))?;
1313
Ok(Self(RustOpaque::new(std::sync::Mutex::new(connection))))
1414
}
1515

1616
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()?;
1818
connection.busy_timeout(Duration::from_secs(30))?;
1919
Ok(Self(RustOpaque::new(std::sync::Mutex::new(connection))))
2020
}

0 commit comments

Comments
 (0)