Skip to content

Commit cf3d5b2

Browse files
committed
fix: formatting codebase
fix: typo
1 parent 81c2426 commit cf3d5b2

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ members = [
1212
"example-crates/wallet_esplora_blocking",
1313
"example-crates/wallet_esplora_async",
1414
"nursery/tmp_plan",
15-
"nursery/coin_select"
15+
"nursery/coin_select",
1616
]
1717

1818
[workspace.package]

crates/bdk/tests/wallet.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ macro_rules! assert_fee_rate {
167167
}
168168
)*
169169

170-
#[allow(unused_mut)]
170+
#[allow(unused_mut)]
171171
#[allow(unused_assignments)]
172172
let mut dust_change = false;
173173
$(
@@ -461,6 +461,16 @@ macro_rules! check_fee {
461461
}};
462462
}
463463

464+
/// A floating point assert! that takes an additional third argument `delta`
465+
/// as a tolerance value when test for equality the first and second argument.
466+
macro_rules! assert_delta {
467+
($x:expr, $y:expr, $d:expr) => {
468+
if !($x - $y < $d || $y - $x < $d) {
469+
panic!();
470+
}
471+
};
472+
}
473+
464474
#[test]
465475
fn test_create_tx_drain_wallet_and_drain_to() {
466476
let (mut wallet, _) = get_funded_wallet(get_test_wpkh());

0 commit comments

Comments
 (0)