Merge bitcoindevkit/bdk#659: Fix: Run README.md examples on the CI

9d2024434eb0d542133d06db14020968e713fd9b Fix: Run README.md example on the CI (meryacine)

Pull request description:

  ### Description
  Seems like `doc(include = "../README.md")` doesn't include the readme file as doc for the dummy struct. This might be due to a difference in Rust edition used back then or something.

  Fixes #637
  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

  #### Bugfixes:

  * [ ] This pull request breaks the existing API
  * [ ] I've added tests to reproduce the issue which are now passing
  * [x] I'm linking the issue being fixed by this PR

ACKs for top commit:
  danielabrozzoni:
    tACK 9d2024434eb0d542133d06db14020968e713fd9b

Tree-SHA512: 5842f7cdc34d76045596a248ec80bbcf86591ec9abe32d92af8322672e7a5d08d3b4baf1a000b1556542b449271dc8c438e6269eaf0204bee815c67fcf1218a8
This commit is contained in:
Daniela Brozzoni 2022-07-20 11:53:11 +02:00
commit 8d3b2a9581
No known key found for this signature in database
GPG Key ID: 7DE4F1FDCED0AB87
2 changed files with 5 additions and 3 deletions

View File

@ -95,6 +95,7 @@ use bdk::blockchain::ElectrumBlockchain;
use bdk::electrum_client::Client;
use bdk::wallet::AddressIndex::New;
use bitcoin::base64;
use bitcoin::consensus::serialize;
fn main() -> Result<(), bdk::Error> {
@ -131,6 +132,7 @@ fn main() -> Result<(), bdk::Error> {
```rust,no_run
use bdk::{Wallet, SignOptions, database::MemoryDatabase};
use bitcoin::base64;
use bitcoin::consensus::deserialize;
fn main() -> Result<(), bdk::Error> {
@ -154,7 +156,7 @@ fn main() -> Result<(), bdk::Error> {
### Unit testing
```
```bash
cargo test
```
@ -162,7 +164,7 @@ cargo test
Integration testing require testing features, for example:
```
```bash
cargo test --features test-electrum
```

View File

@ -9,6 +9,6 @@
// You may not use this file except in accordance with one or both of these
// licenses.
#[doc(include = "../README.md")]
#[doc = include_str!("../README.md")]
#[cfg(doctest)]
pub struct ReadmeDoctests;