|
Ran
|
Jobs
1
|
Files
92
|
Run time
1min
|
Badge
README BADGES
|
push
github
Merge rust-bitcoin/rust-bitcoin#3173: [0.32] Bound decode methods on `Read`, rather than `BufRead` <a class=hub.com/rust-bitcoin/rust-bitcoin/commit/<a class="double-link" href="https://git"><a class=hub.com/rust-bitcoin/rust-bitcoin/commit/79df48e784408b38bc9a54b759dbbc80c0094909">79df48e78 Bound decode methods on `Read`, rather than `BufRead` (Matt Corallo) Pull request description: The Rust world has, sadly, standardized on `Read` for the type from which objects are deserialized. This makes forcing users into `BufRead`s in a library crate somewhat impractical - a `rust-bitcoin` user may implement some deserialization trait provided by a third-party and be stuck with a `Read`. Now, to read a `rust-bitcoin` object they'll have to wrap the `Read` in some `BufRead` wrapper that only buffers single bytes, wrecking their performance. While the user who is using this library should pass a `BufRead` (and may do so), the library using `rust-bitcoin` may not have any choice in the matter. Thus, here, we standardize on the same trait that the entire Rust world has standardized on, using `Read` for bounds in deserialization methods rather than `BufRead`. Here we avoid implementing `bitcoin_io::Read` for all `std` types to encourage users who do have control over the types being passed to use `BufReader` where possible, though this decision should be revisited once we have feedback from downstream users. I only bothered to implement this for 0.32 here (we'll have to do something similar upstream, but its super easy to just rebuild this patch and is probably less error-prone than trying to backport, plus we can discuss further if we want to do this on other version(s)). See #3172 for further discussion. ACKs for top commit: apoelstra: ACK 79df48e784408b38bc9a54b759dbbc80c0094909 successfully ran local tests tcharding: ACK 79df48e784408b38bc9a54b759dbbc80c0094909 Tree-SHA512: a4dffab6d2d9201bdc653b7b212d54ddfc6
55 of 59 new or added lines in 21 files covered. (93.22%)
18418 of 22144 relevant lines covered (83.17%)
17468.08 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 11375296964.1 | 0 |
83.17 |
GitHub Action Run |