• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rust-bitcoin / rust-bitcoin / 11375296964
83%
master: 83%

Build:
Build:
LAST BUILD BRANCH: 0.32.7-arbitrary
DEFAULT BRANCH: master
Ran 16 Oct 2024 11:12PM UTC
Jobs 1
Files 92
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Oct 2024 11:11PM UTC coverage: 83.174%. Remained the same
11375296964

push

github

apoelstra
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

Jobs
ID Job ID Ran Files Coverage
1 11375296964.1 16 Oct 2024 11:12PM UTC 0
83.17
GitHub Action Run
Source Files on build 11375296964
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #11375296964
  • b5e9fc45 on github
  • Prev Build on 0.32.x (#11369850318)
  • Next Build on 0.32.x (#11449951942)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc