You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 30, 2022. It is now read-only.
7e79628 Introduce HexWriter (Riccardo Casatta)
Pull request description:
This struct create an hex string from a writer, in cases where you have
an encodable object this allows skipping the creation of the intermediate `Vec<u8>`
Useful in rust_bitcoin `serialize_hex` https://github.com/rust-bitcoin/rust-bitcoin/blob/0e82376bf85137494ff220608e80b9c78c1932b5/src/consensus/encode.rs#L149 but needs rust-bitcoin/rust-bitcoin#1027 so that result string size is known ahead of time
```
test hex::benches::bench_to_hex ... bench: 2,669 ns/iter (+/- 233)
test hex::benches::bench_to_hex_writer ... bench: 2,034 ns/iter (+/- 167)
```
ACKs for top commit:
apoelstra:
ACK 7e79628
tcharding:
ACK 7e79628
Tree-SHA512: 349c878fb31a1a41a83967434b33051f2b47db8133086204b965e7de1e5a663b16bb4c395cb308f5742fcf1d4ba2d3d0e41df105050c6a5b66022dd03046c941
0 commit comments