]> Untitled Git - bdk/commit
fix(bitcoind_rpc): allow filter_iter example to compile on Windows
authorRavindra Kumar Bundela <ravindrabundela1205@gmail.com>
Mon, 19 Oct 2026 11:38:28 +0000 (17:08 +0530)
committer志宇 <hello@evanlinjin.me>
Mon, 19 Oct 2026 12:22:49 +0000 (12:22 +0000)
commit32795f95dd3f99b4d2dcb3ffb29b894b028504e3
treec7feb2d61ccc61316ae54eb5d0f2133a152648dd
parent0790f0400b108974b538e44d6498dc6fe1157548
fix(bitcoind_rpc): allow filter_iter example to compile on Windows

The filter_iter example previously imported anyhow indirectly from
bdk_testenv. Because Cargo includes package dev-dependencies when
building examples, having bdk_testenv as an unconditional
dev-dependency pulled in electrsd, whose build script relies on Unix
permissions (std::os::unix::fs::PermissionsExt) and fails on Windows.

This change:
- Adds anyhow directly to [dev-dependencies] for bdk_bitcoind_rpc.
- Removes the indirect bdk_testenv::anyhow import in filter_iter.rs.
- Moves bdk_testenv to [target.'cfg(not(windows))'.dev-dependencies].
- Conditionally gates the bdk_testenv-dependent tests on not(windows).

Closes #2338.
crates/bitcoind_rpc/Cargo.toml
crates/bitcoind_rpc/examples/filter_iter.rs
crates/bitcoind_rpc/src/lib.rs
crates/bitcoind_rpc/tests/test_emitter.rs
crates/bitcoind_rpc/tests/test_filter_iter.rs