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

rust-bitcoin / rust-bitcoin / 13995748623
83%

Build:
DEFAULT BRANCH: master
Ran 21 Mar 2025 03:56PM UTC
Jobs 1
Files 129
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

21 Mar 2025 03:49PM UTC coverage: 83.17% (-0.003%) from 83.173%
13995748623

push

github

apoelstra
Merge rust-bitcoin/rust-bitcoin#4128: Remove `From<hash>` for not-general-hash types

<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/db9ec3bed8d6164a0345ba8db1e2162626db7cc5">db9ec3bed<a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/294a58c3f97f38c90513b5b7dca3bcbfca810050"> Remove From<newtype> for $hash (Tobin C. Harding)
<a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/6b2b89c2f71e9bc4c33f0a7385a2c1fab3bb59ec">6b2b89c2f</a><a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/294a58c3f97f38c90513b5b7dca3bcbfca810050"> Remove From&lt;hash&gt; for not-general-hash types (Tobin C. Harding)
</a><a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/200ff473276f62866f0db130ecb485c905714aaa">200ff4732</a> Use compute_merkle_root (Tobin C. Harding)

Pull request description:

  The `hash_newtype` macro is explicitly designed to produce a hash that is not a general purpose hash type to try and prevent users hashing arbitrary stuff with it. E.g., `Txid` isn't meant to be just hash arbitrary data. However we provide a `From` impl that will convert any instance of the inner hash type into the new type. This kind of defeats the purpose. We provide `from_byte_array` and `to_byte_array` to allow folk to 'cast' from one hash type to another if they really want to and its ugly on purpose.

  Also, it is becoming apparent that we may be able to remove the `hashes` crate from the public API of `primitives` allowing us to stabalise `primitives` without stabalising `hashes`.

  For both these reasons remove the `From` impl from the `hash_newtype` macro. Note that deprecating doesn't seem to work so we just delete it.

ACKs for top commit:
  Kixunil:
    ACK db9ec3bed8d6164a0345ba8db1e2162626db7cc5
  apoelstra:
    ACK db9ec3bed8d6164a0345ba8db1e2162626db7cc5; successfully ran local tests

Tree-SHA512: 90bc32582999cd4f96fdd2e9a596db19d72

22 of 22 new or added lines in 3 files covered. (100.0%)

22026 of 26483 relevant lines covered (83.17%)

16842.78 hits per line

Jobs
ID Job ID Ran Files Coverage
1 13995748623.1 21 Mar 2025 03:56PM UTC 129
83.17
GitHub Action Run
Source Files on build 13995748623
  • Tree
  • List 129
  • Changed 4
  • Source Changed 4
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #13995748623
  • 294a58c3 on github
  • Prev Build on master (#13992036628)
  • Next Build on master (#14012811000)
  • 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