8000 Add rand feature flag to the example documentation by yancyribbens · Pull Request #1416 · rust-bitcoin/rust-bitcoin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add rand feature flag to the example documentation #1416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

yancyribbens
Copy link
Contributor

It's confusing trying to follow the documentation here unless you know to enable the rand feature flag. This PR updates the docs so people know to enable the flag.

22:35 < control> hello, how can i generate a simple wallet address using rust bitcoin? cant find working example
22:45 < andytoshi> control: do you have a private key?
22:45 < andytoshi> what kind of address do you want to generate?
22:46 < andytoshi> my guess would be that you want to use bdk rather than rust-bitcoin directl
22:48 < control> P2PKH address and generate private key. just as simple as bit library in python does
22:52 < control> im trying to run this example
22:52 < control> https://docs.rs/bitcoin/latest/bitcoin/util/address/index.html
22:52 < control> but it says ^^^^ could not find `rand` in `secp256k1`

Kixunil
Kixunil previously approved these changes Nov 27, 2022
Copy link
Collaborator
@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 50a665d966f95b310353a91d11da6a7da24261f2

@Kixunil Kixunil added documentation trivial Obvious, easy and quick to review (few lines or doc-only...) one ack PRs that have one ACK, so one more can progress them labels Nov 27, 2022
Copy link
Member
@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

//! # Note: creating a new address requires the rand feature flag
//!
//! ```rust
//! bitcoin = { version = "0.29.2", features = ["rand"] }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version tag here is gonna go out of date quick, can you just put a dummy value there?

//! # Note: creating a new address requires the rand feature flag
//!
//! ```rust
//! bitcoin = { version = "*", features = ["rand"] }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TheBlueMatt good point - the wild card operator works better here.

@tcharding tcharding mentioned this pull request Nov 28, 2022
tcharding
tcharding previously approved these changes Nov 28, 2022
Copy link
Member
@tcharding tcharding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 28fdbbaba8d201bd343c875bff36302d07b164ad

@tcharding
Copy link
Member

Thanks for the contribution man! I built the docs and verified that it looks good in HTML.

TheBlueMatt
TheBlueMatt previously approved these changes Nov 28, 2022
Copy link
Member
@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is sad because bitcoin = {} is not valid rust code.

@yancyribbens yancyribbens dismissed stale reviews from TheBlueMatt and tcharding via f7a6d17 November 28, 2022 16:03
@yancyribbens yancyribbens force-pushed the add-feature-flag-to-docs-example branch from 28fdbba to f7a6d17 Compare November 28, 2022 16:03
Copy link
Member
@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK f7a6d17

Copy link
Collaborator
@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK f7a6d17

@apoelstra apoelstra merged commit 410b820 into rust-bitcoin:master Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
one ack PRs that have one ACK, so one more can progress them trivial Obvious, easy and quick to review (few lines or doc-only...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0