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

rust-bitcoin / rust-bitcoin / 14494548192
83%

Build:
DEFAULT BRANCH: master
Ran 16 Apr 2025 01:57PM UTC
Jobs 1
Files 130
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 Apr 2025 01:56PM UTC coverage: 83.805% (+0.02%) from 83.785%
14494548192

push

github

apoelstra
Merge rust-bitcoin/rust-bitcoin#4348: refactor: Replace fold with try_fold

<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/812c21e2e4a868046b44728c1a6209a866452820">812c21e2e refactor: Replace fold with try_fold (yancy)

Pull request description:

  The and_then combinator performs a kind of bitwise and operation on two Option types here.  This is useful since the `checked` arithmetic returns an option thereby accumulating Option types.  Therefore, either the checked arithmetic operation performs the addition of the unwrapped accumulator, or it returns None.

  Instead of using `and_then` use the provided `try_fold` method which will short circuit on `None` when the checked arithmetic is used.  Also, simplify the staring condition using `Amount:ZERO` since this is logically equivalent to using the first value if one exists.

  Lastly, by using the built in `try_fold`, it's possible the performance will be improved by making use of the short circuit ability instead of evaluating each item even when the accumulator holds a None type.

ACKs for top commit:
  apoelstra:
    ACK 812c21e2e4a868046b44728c1a6209a866452820; successfully ran local tests
  tcharding:
    ACK 812c21e2e4a868046b44728c1a6209a866452820

Tree-SHA512: 1cfcd4fa2a36f747cbcca107829d1f6df83

2 of 2 new or added lines in 1 file covered. (100.0%)

22366 of 26688 relevant lines covered (83.81%)

16668.09 hits per line

Jobs
ID Job ID Ran Files Coverage
1 14494548192.1 16 Apr 2025 01:57PM UTC 130
83.81
GitHub Action Run
Source Files on build 14494548192
  • Tree
  • List 130
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #14494548192
  • 551b52c7 on github
  • Prev Build on master (#14481827127)
  • Next Build on master (#14496188129)
  • 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