Skip to content

Commit 4d70725

Browse files
committed
Merge rust-bitcoin#5135: chore: fix path to the wrapper
60ee4ca chore: fix path to the wrapper (phrwlk) Pull request description: The comments contain an incorrect path to the wrapper. In fact, the bridge module is not public (mod bridge;), and the FromStd type is re-exported at the top level. Correct ways to use it: io::FromStd (as in the code on L89) or, if connecting the crate without an alias, bitcoin_io::FromStd. ACKs for top commit: tcharding: ACK 60ee4ca apoelstra: ACK 60ee4ca; successfully ran local tests Tree-SHA512: 69bb24d34a1d5b52113a886409058c96887f73a024cb40963cbe503e9973a8281015cdc598c77dd4bf52401e6933f81d33f4446f009d91f62f217631a806de44
2 parents 3dc5dc8 + 60ee4ca commit 4d70725

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bitcoin/examples/io.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn main() {
1717
// Encode to a custom type by implementing `bitcoin_io` traits.
1818
encode_to_custom_type();
1919

20-
// Encode to a foreign custom type by using the `bitcoin_io::bridge::FromStd` wrapper.
20+
// Encode to a foreign custom type by using the `bitcoin_io::FromStd` wrapper.
2121
encode_using_wrapper();
2222
}
2323

@@ -75,7 +75,7 @@ fn encode_to_custom_type() {
7575
/// Encodes to a custom type by using the `bitcoin_io::bridge` module.
7676
///
7777
/// If you have a type that you don't control that implements `std::io::Write` you can still encode
78-
/// to it by way of the `io::bridge::FromStd` wrapper.
78+
/// to it by way of the `io::FromStd` wrapper.
7979
fn encode_using_wrapper() {
8080
use pretend_this_is_some_other_crate::WriteCounter;
8181

0 commit comments

Comments
 (0)